Is there a good way to write a 2-D array to a table in DataNitro? I'm working on a basic sudoku solver in Excel and would rather use python than VisualBasic.
To run my example you will need to fill columns A and B in Sheet1 with some values. Then run test(). It will read first two rows and add the values to the BigArr. Then it will check how many rows of data you have and read them all, from the place it has stopped reading, i.e., 3rd row.
To create an array use the new keyword, followed by a space, then the type, and then the number of rows in square brackets followed by the number of columns in square brackets, like this new int[numRows][numCols] . The number of elements in a 2D array is the number of rows times the number of columns.
Yes, you can use the table cell property - we just added this in our last update.
For example:
x = [[6, 7, '', 2, 3, '', '', '', ''], ... ['', '', '', '', 6, 8, '', 3, 2]]
# the sudoku puzzle, written out row boy row
Cell("A1").table = x
Source: I'm one of the DataNitro developers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With