Google Answers Logo
View Question
 
Q: Importing files into Excel - can I preset formatting? ( No Answer,   5 Comments )
Question  
Subject: Importing files into Excel - can I preset formatting?
Category: Computers
Asked by: bisonbison-ga
List Price: $2.00
Posted: 25 Mar 2005 14:20 PST
Expires: 24 Apr 2005 15:20 PDT
Question ID: 500461
I've got a perlscript that produces semi-colon delimited text files. 
When imported into excel, there are usually about 15 columns and 40
rows.  What I'd like to be able to do is indicate how cells should be
formatted so that when they're imported into Excel, they're already
bolded/colored/italicized/etc.  I just don't know if tags are allowed,
and if they are, what the standard is (<b>, [b]...)

Are there any excel-supported formatting tags that would survive
import from a plaintext file?
Answer  
There is no answer at this time.

Comments  
Subject: Re: Importing files into Excel - can I preset formatting?
From: hammer-ga on 25 Mar 2005 14:36 PST
 
Can your perl write HTML instead? I've found that Excel will bring in
an HTML table beautifully, with fonts and colors and everything.

- Hammer
Subject: Re: Importing files into Excel - can I preset formatting?
From: wakerobin-ga on 26 Mar 2005 08:28 PST
 
suggest you format another spreadsheet the way you want, then copy and
<paste><special><formats> onto your perlscript created sheet. Easy
enough to write a macro to do this step, so with one click, you'd get
the same result as a lot of programming.
Subject: Re: Importing files into Excel - can I preset formatting?
From: bisonbison-ga on 26 Mar 2005 08:54 PST
 
wakerrobin, the problem with that is that i never know which cells
need highlighting, bolding, colorizing or whatever, that's determined
in the perl script.  So I was just hoping there was something I could
stick in between the ;s to indicate cell-by-cell formatting.

hammer- 

I know html pretty well, so I'll give that a try.  Just not a very elegant solution.
Subject: Re: Importing files into Excel - can I preset formatting?
From: dreamboat-ga on 26 Mar 2005 16:58 PST
 
bisonbison: It's so simple. Next time you open the file, record a
macro while you do your formatting. Take your time, and carefully take
your steps.

--Tools-->Macro-->Record new macro
--Tell it to save in "personal..."
--Give it a keyboard shortcut
--Begin recording
--Hit Ctrl + Home (that way, no matter where your cursor is your macro
starts working in A1)
--Take all your formatting steps
--Ctrl+Home (so nothing is selected when you're done)
--Stop recording

Next time you get that CSV, open it, hit your shortcut key, and voila!

Here's some more details: http://www.theofficeexperts.com/officevba.htm#ExcelVBA
Subject: Re: Importing files into Excel - can I preset formatting?
From: dmrmv-ga on 05 Apr 2005 14:37 PDT
 
The suggestion for HTML sounds like the best one. If that doesn't
work, you could write a VB script that would parse the data after
import and apply formatting based on values in the data. It could also
do the actual import so you would only have one step.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy