From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-29-2015 02:01 AM
Hi~
when write a table to MS Excel, the number all stored as text as you can see green flag on left top corner of each cell, this is cause the fomula in upper cell un-workable.
the code that used to write excel as below:
have you even seen this before? pls advice, thx!
Solved! Go to Solution.
07-29-2015 02:08 AM
07-29-2015 02:12 AM
Hi GerdW,
but the table also contained string like date/ operator name, only the test result is number (show in below).
Thanks,
Eli
07-29-2015 02:14 AM - edited 07-29-2015 02:15 AM
Hi ELI,
and what's the problem then?
Write the strings as strings. Write the numbers as numbers. Handle them different!
(You might use even more ActiveX nodes to tell Excel on how to interpret each column of data. I don't think it will be easier this way.)
Lesson learned: Provide all needed information in the first place, not piece by piece…
07-29-2015 02:21 AM
then it will slow down the process of saving to excel file follow your way.
just like the code I used before, in this way, the string and number can correct show in Excel, but in this way we waste much time to write excel, bcs the table was written to cell one by one.
can we solve this error in LabVIEW? with activeX..
07-29-2015 02:24 AM
There's a hack you can use - after you write the values, read the data from the Value2 property and write what you just read back to the property (so it's write A, read B, write B). I don't know why, but this works. Probably some quirk in how Excel auto-formats types.
07-29-2015 02:31 AM - edited 07-29-2015 02:35 AM
Hi ELI,
but in this way we waste much time to write excel, bcs the table was written to cell one by one.
Nobody mentioned to write cell by cell. You still can write full columns or even 2d arrays of data - you just have to separate strings from numbers!
can we solve this error in LabVIEW? with activeX..
There is no error in LabVIEW. And there is no error in Excel. It's an error in your programming!
By now you got two different solutions presented, how much more do you need?
I thought you learned a lesson by now. But you still feed us with breadcrumbs of information with each of your posts: Now you bring the execution time into play…
07-29-2015 02:40 AM
its amazing, and it really helped!
just read back then write it again, the error disappered.
thank you very much!
07-29-2015 02:54 AM
not learned a lesson, I am already known these (your suggestion) before! now the issue was solved by tst (Knight of NI).
anyway, thanks for your reply, though it not helped.
07-29-2015 03:43 AM