rudi Posted June 26, 2008 Posted June 26, 2008 (edited) Hi. I want to write an 2D Array (3 columns, ~ 100 rows) to an Excel Sheet using the function _ExcelWriteSheetFromArray() in ExcelCOM_UDF. When I use that function, only two columns make it to the sheet, the 3rd isn't "arraving". Why? This sample shows how I fail: ; Autoit V3.2.12.0 ; ExcelComUDF Test #include <excelCOM_udf.au3> #include <array.au3> Local $TestArr[4][3] = [ _ ["1-1", "1-2", "1-3"], _ ["2-1", "2-2", "2-3"], _ ["3-1", "3-2", "3-3"], _ ["4-1", "4-2", "4-3"]] _ArrayDisplay($TestArr) Local $oExcel = _ExcelBookNew(1) _ExcelWriteSheetFromArray($oExcel, $TestArr) Regards, Rudi. <edit typos> Edited June 26, 2008 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE!
aslani Posted June 26, 2008 Posted June 26, 2008 By default, the function assumes base-1 array, so you need to do the following. _ExcelWriteSheetFromArray($oExcel, $TestArr, 1, 1, 0, 0) [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
rudi Posted June 26, 2008 Author Posted June 26, 2008 By default, the function assumes base-1 array, so you need to do the following. _ExcelWriteSheetFromArray($oExcel, $TestArr, 1, 1, 0, 0)oÝ÷ Ûú®¢×zÅ¡W²¢æ§³«yÒ+yÊ ,ÞvØZ¶Ø^ÖËk£À4?Û¶»-reºiðz·¦Ë"¢¶aË®*mÜ(®K'£®¶sc²WFöBc2ã"ã"㣲W6VÄ6öÕTDbFW7@ ¢6æ6ÇVFRfÇC¶W6VÄ4ôÕ÷VFbæS2fwC°¢6æ6ÇVFRfÇC¶'&æS2fwC° ¤Æö6Âb33cµFW7D'%³5Õ³UÒÒ²ð ²gV÷C³ÓgV÷C²ÂgV÷C³Ó"gV÷C²ÂgV÷C³Ó2gV÷C²ÂgV÷C³ÓBgV÷C²ÂgV÷C³ÓRgV÷CµÒÂð ²gV÷C³"ÓgV÷C²ÂgV÷C³"Ó"gV÷C²ÂgV÷C³"Ó2gV÷C²ÂgV÷C³"ÓBgV÷C²ÂgV÷C³"ÓRgV÷CµÒÂð ²gV÷C³2ÓgV÷C²ÂgV÷C³2Ó"gV÷C²ÂgV÷C³2Ó2gV÷C²ÂgV÷C³2ÓBgV÷C²ÂgV÷C³2ÓRgV÷CµÕÐ ¥ô'&F7Æb33cµFW7D'" ¤Æö6Âb33c¶ôW6VÂÒôW6VÄ&öö´æWr ¥ôW6VÄçVÖ&W$f÷&ÖBb33c¶ôW6VÂÂgV÷C´gV÷C²ÂgV÷C´¥£#gV÷C²¥ôW6VÅw&FU6VWDg&öÔ'&b33c¶ôW6VÂÂb33cµFW7D'"Ã2Ã2Ãà Thanks for your help, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
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