Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you in advance for reading my question...
I am a database programmer, my strength is not Excel, but here I am with a new task, so I am coming to you for some guidance. We receive an excel spreadsheet from an online company that collects data for us. The spreadsheet has roughly 50 columns. Every time we get the speadsheet (once a week or so), the columns are always in the same order with new data. I want to create a macro that goes through the columns and grabs the data I want, and outputs it to a text file, deliminated within SQL statements. As an example, imagine a spreadsheet that looks like this: [image: http://www.1st-r8.com/working/images/excel111.gif] could produce a text file that reads something like this Insert into mytable (firstname, lastname, address1, city, state, zip) values ('Steven', 'Smith', '1144 Hill Dr.', 'Glendale', 'CA', '91208'); Insert into mytable (firstname, lastname, address1, city, state, zip) values ('Mary', 'Bump', '2288 Mill Lane', 'Pasadena', 'CA', '91343'); etc..... Notice how the macro would be written to skip over column C. I am very skilled at writing scripts including VBS and Active Server pages. But, I am new to programming in Microsoft Office Aps, especially Excel. So, if you could point out some online articles or tutorials, or if you have done somthing similar and can post your notes, I would be very grateful. Sincerely, Edward Stoever ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Works like a charm.... THANK YOU!
Edward ![]() ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Outlook - export contacts (custom additional fields) | Excel Discussion (Misc queries) | |||
Adding custom list and text boxes to the custom tool bar from Excel C API | Excel Discussion (Misc queries) | |||
Export custom Macro Button Images | Setting up and Configuration of Excel | |||
Export custom Macro Button Images | Excel Discussion (Misc queries) | |||
Custom export with multiple rows for each row in original spreadsh | Excel Worksheet Functions |