jando123 Posted August 15, 2012 Share Posted August 15, 2012 (edited) Hello,This seems like a newb question. I have a 2D array of data and I want to be able to write a particular row of that array into an Excel doc.I tried to do it using _ExcelWriteSheetfromArray but this copies the whole 2D array and the parameters for the function doesn't help.I thought maybe if I place in the row # that I need ex: _ExcelWriteSheetfromArray($oExcel, $Array[4]) it would help but I get a dimension error._ExcelWriteArray seems to only work on 1D arrays. What to do?Thanks Edited August 15, 2012 by jando123 Link to comment Share on other sites More sharing options...
zpanderson Posted August 15, 2012 Share Posted August 15, 2012 (edited) You could always just write the cells individually since you're only wanting one particular row. Local $tmp[1][2] $tmp[0][0] = '1x1' $tmp[0][1] = '1x2' $oExcel = _ExcelBookNew() _ExcelWriteCell($oExcel, $tmp[0][0], 1, 1) _ExcelWriteCell($oExcel, $tmp[0][1], 1, 2) Edited August 15, 2012 by zpanderson Link to comment Share on other sites More sharing options...
Juvigy Posted August 16, 2012 Share Posted August 16, 2012 Redim your array to have one dimension and write it to the sheet. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now