Sign in to follow this  
Followers 0
rudi

Failing to use _ExcelWriteSheetFromArray() in ExcelCOM_UDF

3 posts in this topic

#1 ·  Posted (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 by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites



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Ò+,Þ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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0