How to disable autamated features of Excel?

  • Thread starter Thread starter Bojidar Markov
  • Start date Start date
B

Bojidar Markov

Hi,

I'm using a CSV file as an import/export file and usualy before each import
I need to edit some of the values.
The problem comes when I open the CSV file in Excel the starting zeroes of
all numeric values are gone.

How can I disable these automated features of Excel?
I don't want Excel to modify the values at all.

Thanks in advance
Bojidar Markov
 
Bojidar

If you are able to change the *.csv extension to *.txt you can open directly
into Excel and the Text Import Wizard will pop up.

You then select "column data fromat" and option button for "Text".

Your zeros will remain.

Note: these are not numbers, but text.


Gord Dibben Excel MVP
 
Hi Gord,

Can this someway be automated?
Its an inconvenience for the user to do this each time he imports : /

Thanks for the suggestion

Regards
Bojidar
 
Start a new workbook.
Turn on the macro recorder while you're importing (and modifying) the data
Turn off the macro recorder.
close your imported workbook.
Save the workbook with the recorded macro.

Now just open this macro workbook and tools|macro|macros| and run that recorded
macro when you want to do it again.

You may have to generalize the code somewhat (depending on how much more you
do), but maybe not, too.

If you have questions, just post back with your specifics.
 
As far as changing the .CSV extension to .TXT, I believe that would have to be
done prior to the import unless some kind soul can come up with VBA code to do
that "on the fly".

Gord
 
Back
Top