Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

dimension number format not working in excel

Hi, all,

I use nprining 16.3 and QV 11.20 SR12.

I am export a pivot table in an nprinting excel template. The dimension Unit with number format '#,##0.00' is exported as General (default number in excel).

My desired output:

CurUnitNum
EUR1.80626
EUR1.8018
USD1.808
EUR0.45160

The actual output:

CurUnitNum
EUR1.8626
EUR1.818
USD1.88
EUR0.45160

I modified the Document property ->Number for Unit field, and it does not work. The Unit is all number with 2 decimals, no string.

This can also be test by just export the table to excel in QV, get the same result with "General" format.

May I know how can I get my required number format?

Thanks

Zhihong

6 Replies
mkelemen
Creator III
Creator III

Hi,

The problem is that you use Number which strips the trailing zeroes. Use Fixed to 2 decimals instead.

BR,

  Matus

Anonymous
Not applicable
Author

Hi, Matus,

Thanks.

I do use the decimals, both in the load script, and in the dimension number format setting.

And format are correct in the dash, but when export to excel, then it does not work.

And BTW, I use the "Table" template in nprinting excel template, as this is a pivot table, so can not set the format for the cells in excel.

Also tried to set the format for the column in the generated report, which gonna hold data for that dimension.

No luck as well.

See attachment below:

Selection_296.png

Selection_297.png

mkelemen
Creator III
Creator III

Sorry, I missed that it is pivot.

It seems that pivot can not export the dimensions as number.

Can't you use straight table?

  Matus

Anonymous
Not applicable
Author

Hi,  Mauts,

No, as we need total in different dimension level, so pivot is a better solution. Otherwise,

need to calculate in the nprinting template.

Then I think we need to sacrifice the Unit format here.

Thanks for your help!

Zhihong

Daniel_Jenkins
Specialist III
Specialist III

Hi Zhihong,

Why not use a straight table as the source & build the PivotTable in your NPrinting Excel report template? How to Create a Pivot Table from Excel Table Columns

HTH - Daniel.

Anonymous
Not applicable
Author

Hi, Daniel,

Thanks for the suggestion. I do have experience with creating pivot table using levels. and that takes ages.

The link you sharing is a great idea to improve that!!!

But the way in the link seems perfect to generate one pivot table, I do not know whether it works by using level to get report for different clients, in one sheet. I will give it a try. Thanks

Zhihong