CSV trailing zeros

imeade

New Member
Joined
Jun 28, 2022
Messages
16
Office Version
  1. 365
Platform
  1. Windows
I have a process in place that saves an excel file as a csv but I need the csv to preserve the trailing zero on the postingperiod column.

When the csv is created, it is removing the trailing zero from "2022.10" resulting in "2022.1", is there some vba code out there that can force the trailing zero to remain intact? I have tried various things with no luck.

Thanks
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Are you sure that the trailing zero is really being removed?
If you have the Excel file formatted properly to show the trailing zero, and then save as a CSV, it should keep that trailing zero.

Where people get into trouble is that they then try to view the resulting CSV in Excel.
Never view a CSV file in Excel if you want to maintain all the formatting!!!

When you open a CSV file in Excel, Excel automatically applies its own data conversions to the file. So you NOT seeing the data as it actually appears in the CSV.
ALWAYS use a Text Editor (like NotePad) to open and view CSV files if you want to see what the data REALLY looks like in the CSV file.
If you view the created CSV file in NotePad, do you see the trailing zeroes?
 
Upvote 0
Solution
Are you sure that the trailing zero is really being removed?
If you have the Excel file formatted properly to show the trailing zero, and then save as a CSV, it should keep that trailing zero.

Where people get into trouble is that they then try to view the resulting CSV in Excel.
Never view a CSV file in Excel if you want to maintain all the formatting!!!

When you open a CSV file in Excel, Excel automatically applies its own data conversions to the file. So you NOT seeing the data as it actually appears in the CSV.
ALWAYS use a Text Editor (like NotePad) to open and view CSV files if you want to see what the data REALLY looks like in the CSV file.
If you view the created CSV file in NotePad, do you see the trailing zeroes?
Thanks, there was some confusion on import template within NetSuite, thanks for the insight
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,509
Members
448,967
Latest member
screechyboy79

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top