LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

excel set range type number

Hi,
I'm working with the ExcelReport module, CVI 8.1.
I have a report sheet with strings & number cell types. I want to set all the cells in the current sheet to "number" type,
i.e. strings displayed as text, numbers displayed as numbers with 2 digits after the fractional point.
I found the function ExcelRpt_GetRangeDataType but could not find the equivalent Set function.
How can it be done?
Thanks,
Ido
0 Kudos
Message 1 of 4
(4,299 Views)
Hi IdoZe,
 
There doesn't seem to be a direct equivalent Set function corresponding to the ExcelRpt_GetRangeDataType function, but you can set the data type using either
Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 2 of 4
(4,277 Views)

Thanks Jervin,

I was considering this option but my excel sheet is far too big (and already filled with data). reading each cell and overwrite it with the right format is not possible.

I was wondering if anyone knows about a way to set it - I know this can be done using Excel application. Maybe using the ActiveX controller?

Ido

0 Kudos
Message 3 of 4
(4,265 Views)

Hi IdoZe,

You can try using ActiveX from CVIto do that, however this isn't part of CVI's ExcelReport module and so I'm not sure what functions you would have to call on the ActiveX object.

You best bet is probably digging through Microsoft's Excel documentation.
Here are some resources that might be helpful:
MSDN: Excel Object Model Reference
MSDN: How Do I... in Excel

Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 4 of 4
(4,247 Views)