chobo2

_Excel_RangeRead Strips Number Formating?

10 posts in this topic

Hi

I am using _Excel_RangeRead from Excel UDF. I noticed when it reads in my data it strips out number formating? Do I have set an option to stop this from happening?

Example --> 1,000.00 is what I see in excel. Once _Excel_RangeRead has read in the excel row I see 1000

_Excel_RangeRead($excelWorkbook, $worksheetName)

Is what I am using.

Share this post


Link to post
Share on other sites



The function now retrieves the value. To retrieve the format please check the help file for _Excel_RangeRead. 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.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
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Note that this flag only works for a single cell. 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.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
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
On 10/18/2016 at 11:09 PM, water said:

The function now retrieves the value. To retrieve the format please check the help file for _Excel_RangeRead. 

Do you mean I should use the flags? As I tried all of them I did not see anything else about formatting. 

Share this post


Link to post
Share on other sites

Did you only read a single cell?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.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
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Just now, water said:

Did you only read a single cell?

No I am reading the entire worksheet in at once. 

Share this post


Link to post
Share on other sites

Doesn't work. As I posted in #4: "Note that this flag only works for a single cell."
That's a limitation of Excel.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.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
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Just now, water said:

Doesn't work. As I posted in #4: "Note that this flag only works for a single cell."
That's a limitation of Excel.

Ok, was hoping that was not the case.

Share this post


Link to post
Share on other sites

#10 ·  Posted

I have never tried it but you could access the NumberFormat property (https://msdn.microsoft.com/en-us/library/ff196401(v=office.14).aspx) and try to format the returned values accordingly.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.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
Tutorials:
ADO - Wiki

 

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