01-29-2016 01:02 AM
Dear sir,
I am writing the Hexadecimal String data into excel but it is converting to exponential values whenever "E" comes in between two numbers.
Here I am attaching the example VI for easy understanding (observe "text2").
I want to write same data not exponential data.
Please let me know how to do that.
Thanks & regards,
S Nagaraju
01-29-2016 01:08 AM
01-29-2016 02:01 AM
Dear sir,
Putting in quotes for every data is very difficult and the hex data is acquiring from cusomized digital board.
And everything should be done through programmatically no manual changes in excel.
Can you please modify the code and attach here if possible..
Regards,
S Nagaraju
01-29-2016 02:29 AM
01-29-2016 03:17 AM
Dear Sir,
Sorry, I forgot to delete this sentence "Can you please modify the code and attach here if possible.." in the post.
I tried with quotes but it is writing quotes also into excel.
Actually I am receiving thousands of Hex data from the target dynamically and writing into excel.
Showing the data with quotes in each and every cell is looking awkward.
Any other possible options.....
Regards,
S Nagaraju
01-29-2016 04:37 AM
@Sonti_11532 wrote:Showing the data with quotes in each and every cell is looking awkward.
To fool Excel, you actually want a ' (apostrophe) before the text, not quotes around.
'1234 will be treated as a string in Excel.
01-29-2016 07:54 AM
The problem is not with LabVIEW, but with Excel. Open Excel. Click on a Cell. Type 0E4, observe 0.00E+00 in the cell. Excel is doing this. Excel has built-in "rules" (which LabVIEW cannot change) that governs when it "chooses" to consider the contents of a cell as a string and when as a number that can be displayed in a variety of numeric formats.
By your description, all of the data you are writing to Excel are numeric, including 4Edf (= 20191 if counting with fingers). You have the following logical choice -- send all of the data to Excel as numerics, or send all of the data to Excel as strings. If you choose to do the former, you will need to take Mike's second suggestion, convert the data to I32, write to Excel (which will treat it as numeric, which it is), and, if you want Excel to display it as numeric, change the cell format appropriately. If you choose to send all of the data to Excel as strings, you need to take notice that Excel will not "listen to you" unless you force it to accept the string data as strings, and the way to do that is to take Mike's first suggestion (modified by Crossrulz -- I'm surprised you didn't figure this out yourself -- does this mean you (a) don't know LabVIEW and (b) you don't know Excel? Oh, dear ...).
To paraphrase Mike's second message, "You Pays Your Money and You Takes Your Choice".
Bob Schor
01-29-2016 10:16 AM