ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Exporting to Word in a csv file (https://www.excelbanter.com/excel-discussion-misc-queries/41353-exporting-word-csv-file.html)

Brad

Exporting to Word in a csv file
 
I am doing the above and leading zeros are being dropped...I need them in
because they are account codes that I am uploading to my GL. Can anyone help?

Brad

Marc

I've run into leading zero problems before when exporting/importing.

Try this--make sure your data items with leading zeros are "text" format,
that should preserve the leading zeros.

I made a test file, saved it as CSV, then pulled into Word (insert file),
and the leading zeros were still there.

But, if you open up the CSV file again in Excel, the leading zeros
disappear...

"Brad" wrote in message
...
I am doing the above and leading zeros are being dropped...I need them in
because they are account codes that I am uploading to my GL. Can anyone

help?

Brad




Brad

Thanks Marc, worked great

Brad

"Marc" wrote:

I've run into leading zero problems before when exporting/importing.

Try this--make sure your data items with leading zeros are "text" format,
that should preserve the leading zeros.

I made a test file, saved it as CSV, then pulled into Word (insert file),
and the leading zeros were still there.

But, if you open up the CSV file again in Excel, the leading zeros
disappear...

"Brad" wrote in message
...
I am doing the above and leading zeros are being dropped...I need them in
because they are account codes that I am uploading to my GL. Can anyone

help?

Brad





Earl Kiosterud

Marc,

The export from Excel as csv will include the leading zeroes, if they're
there in the sheet. Opening the csv file in Notepad can be used to verify
that. When the csv is opened in Excel, it treats the fields as numbers, the
same as if you'd manually typed them in. Numbers don't have leading zeroes
(though they can be formatted to show them). So they're lost in the
reopened file because they were converted to numbers.
--
Earl Kiosterud
www.smokeylake.com

"Marc" wrote in message
...
I've run into leading zero problems before when exporting/importing.

Try this--make sure your data items with leading zeros are "text" format,
that should preserve the leading zeros.

I made a test file, saved it as CSV, then pulled into Word (insert file),
and the leading zeros were still there.

But, if you open up the CSV file again in Excel, the leading zeros
disappear...

"Brad" wrote in message
...
I am doing the above and leading zeros are being dropped...I need them in
because they are account codes that I am uploading to my GL. Can anyone

help?

Brad






David McRitchie

Create or change the extension to .txt instead of .csv
before opening in Excel. That way the Text Import Wizard
will give you a chance to indicate that a column is text instead
of a number, and for dates which order year, month and day
appear in.

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Earl Kiosterud" wrote in message ...
Marc,

The export from Excel as csv will include the leading zeroes, if they're
there in the sheet. Opening the csv file in Notepad can be used to verify
that. When the csv is opened in Excel, it treats the fields as numbers, the
same as if you'd manually typed them in. Numbers don't have leading zeroes
(though they can be formatted to show them). So they're lost in the
reopened file because they were converted to numbers.
--
Earl Kiosterud
www.smokeylake.com

"Marc" wrote in message
...
I've run into leading zero problems before when exporting/importing.

Try this--make sure your data items with leading zeros are "text" format,
that should preserve the leading zeros.

I made a test file, saved it as CSV, then pulled into Word (insert file),
and the leading zeros were still there.

But, if you open up the CSV file again in Excel, the leading zeros
disappear...

"Brad" wrote in message
...
I am doing the above and leading zeros are being dropped...I need them in
because they are account codes that I am uploading to my GL. Can anyone

help?

Brad








David McRitchie

Oops, just noticed that you are importing into Word not into Excel,
but you could copy and paste from Excel to Word and then the
formatting would to into Word.




All times are GMT +1. The time now is 01:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com