HighlanderSword

Excel UDF and Range_Read

7 posts in this topic

Hello,

Is it a known Issue when using Range_Read from the Excel UDF , and the range being read has any #N/A Values for a fomula

it will not read in the values and aborts with error codes. I know I can change the Formula to not display the NA Value, however I then

have to change all of the other formulas in the workbook that are using the #N/A and doing something to the cell.

 

Share this post


Link to post
Share on other sites



Not known. Will check. Can you please post the exact statement you run?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Local $aResult = _Excel_RangeRead($oWorkbook, 2, "A1:B13",1)

Share this post


Link to post
Share on other sites

Try

Global $aResult = _Excel_RangeRead($oWorkbook, 2, "A1:B13", 1, True)

The Excel transpose method seems to have a problem mit #NA. So the above call uses the internal function.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

That brings all of the #N/A is blank cells , the #N/A is not there in the new array

Share this post


Link to post
Share on other sites

#N/A is returned as NULL. You could use the following code to check for NULL and - if needed - set the array's cell to accordingly.
 

MsgBox(0, "Null?", IsKeyword($aResult[0][0]) = $KEYWORD_NULL)

 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

ok will give that a try and also check what is does with Excel cells that have no data as well.

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