LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

number format for excel

Solved!
Go to solution

Hello,

 

my problem is to convert my numbers into a correct excel format. the numbers are saved in a spreadsheet file and with an editor it looks like this:

9,723197E+0

8,229011E-1

 

When I filled a Excel file with this data it looks like:

9723,00 and 0,823.

 

I tried different things to solve the problem but nothing helped.

 

Can anyone help me?

 

markus

0 Kudos
Message 1 of 11
(9,672 Views)
What are you using to write the numbers in excel format? If you are using the Report Generation Toolkit, there is a palette dedicated to formatting. If you do that, then, in excel, select Format»Cells and click the Number tab to view the available number format types for that version of Excel. If you are attempting to do something else, be sure to let us know.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 11
(9,665 Views)
That just looks like something is set to be formatted in the style of having a comma rather than a decimal such as in spain and some european countries. Probably something you can easily fix by changing your excel number format.
0 Kudos
Message 3 of 11
(9,649 Views)

Thank you for your answers.

 

I can't solve the problem.

The data will be send with the report generation toolkit and I use a german excel.

 

If I start the data export to excel, i can see that first the data is exported right (It looks like the right format) and after that it seems that excel calculate something an make the wrong format.

 

Inormation: 

The data was saved with Waveform to File

0 Kudos
Message 4 of 11
(9,636 Views)

Hello WeberM,

 

first I have some questions:

1) What version of LV are you using? 8.6, 8.5 etc.? German or English?

2) Do you use the "Export Waveforms to spreadsheet files" function? Or what function Do you exactly use?

3) What version of Excel are you using?

4) Can you add an example-VI?

 

I wrote waveforms to a spreadsheet file with the above mentioned function. When I opend that file with the editor it looked exactly like you discribed. Importing that file to excel I were able to choose for the standard format in the extended option if to use "." or "," as decimal seperator. The Data was imported correctly in my case.

I used Excel 2007 and LabVIEW 8.6, both german.

 

Regards

Johannes Gräper

Applications Engineering

NI Germany  

0 Kudos
Message 5 of 11
(9,617 Views)

Hello JoGrMu

 

I use LV8.6 (English) and Excel 2003 (German).

The Files I read are written with the waveforms to a spreadsheet file.vi.

See attached the export to excel vi.

Changing the "use system decimal point" from the fract/exp string to number.vi doesn't help.

0 Kudos
Message 6 of 11
(9,611 Views)
You will need to expressly declare the default number format for LabVIEW in the enviromental settings of the LabVIEW options.  The default setting for this in the English versions of LabVIEW is 1,000.00 = 1E3.  The other option is to configure LabVIEW and Excel to use the system settings and configure the machine regional and language options for the desired formating.

"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 11
(9,585 Views)

Hello Jeff,

 

thank you for your answer.

I can't find the environmental setting to change this format.

There are only check boxes and a edit field for maximum undo steps.

 

Markus

0 Kudos
Message 8 of 11
(9,581 Views)
Solution
Accepted by WeberM

Hello Markus,

 

I have two things you could try - both helped for me. But I strongly recommand to make a Cope of the VI you will have to change, in case that you need the original functionality.

 

1) Open ...\national instruments\LabVIEW 8.x\vi.lib\addons\_office\_excelsub.llb\Excel_Insert_Table.vi

2) Delete the two property-nodes Range>>Value so that the VI looks like the attached screenshot "Excel I.jpg"

3) You can additional place a "Frag/Exp string to number"-Function in the VI (see screenshot "Excel II.jpg")

 

But I repeat, please make a copy of that VI and save it to a different folder before you make these changes.

 

Regards

Johannes

Download All
0 Kudos
Message 9 of 11
(9,522 Views)

Hello Johannes,

 

thank you for your answer.

I tried your solution and it worked.

 

Markus

Message 10 of 11
(9,492 Views)