DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Create a template for converting flat files to Excel or DB  (Read 6,510 times)

dementedmuppet

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 26
    • Participated in NANY Challenge Once
Create a template for converting flat files to Excel or DB
« on: January 25, 2008, 07:21 PM »
The obvious:  Working with any Microsoft product SUCKS

... but I have no choice because it is for work and my employer chose MS

The problem:  It is a waste of time to set the column widths every time I have to convert the flat files to Excel since there are 76 columns and the width is the same every time.

Question:  How do I create a template??

The files are .txt
I know the column width
I can manually set the column widths while converting from .txt to .xls
Can't I create a template to do this?

I keep searching Google and Microsoft but not finding any 'useful' answers

Is there a better place to search????  Or does someone actually know how to do this???
Impossible is nothing

David1904

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 43
Re: Create a template for converting flat files to Excel or DB
« Reply #1 on: January 25, 2008, 07:59 PM »
Perhaps you could write a macro, or use one of the XL addin packages/utilities or one of the general macro recording utilities available (perhaps Google for "macro excel" or "macro excel utility")
That should give plenty of leads.
I haven't used AHK but lots of folk here have and maybe they can comment on using that.

Cheers,

David

dementedmuppet

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 26
    • Participated in NANY Challenge Once
Re: Create a template for converting flat files to Excel or DB
« Reply #2 on: January 25, 2008, 09:03 PM »
The macro works great & you rock  :-*
Impossible is nothing

Original address: https://www.donationcoder.com/forum/index.php?topic=12004.0