View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default "General" format default

Excel will treat anything in a CSV file that looks like a number as a
number--same with dates!

If your layout of the CSV file doesn't change (although the contents will), I'd
do this.

Instead of sharing a .CSV file, share a .Txt file (or have the end user rename
the .CSV file to .Txt).

Then give them a workbook that opens that .txt file and parse the data the way
you want.

You could get most of your code by recording the macro when you do it manually.

Then put a giant button from the Forms toolbar on the first worksheet in this
workbook. Assign the macro to do the import to this button. And finally, share
this workbook with the user.

Tell them to get the .Txt file and store it somewhere on their pc.

Then have them open this macro workbook and click the big button.

That macro can do all your formattng, add subtotals, headers, formulas,
pivottables--anything you can think of. In stead of having the unskilled end
user spend time with formatting, put the smarts into the macro.

Roney wrote:

Hello. I need to have a rather unskilled person import CSV data repeatedly
into excel. Some of the data is numeric in form (e.g 000123 or 089.00) but I
want it treated as text so that it is imported exactly as presented. Other
than having the person manually select the "text" option for each column
every time (which is fraught with peril), is there a way to do this? Can I
change the import default format from "General" to "text"?

Thank You

Roney Pate


--

Dave Peterson