Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Deleting specific columns in an Excel spreadsheet...

Reply
 
Old 01-21-2009   #1 (permalink)
centre21


 
 

Deleting specific columns in an Excel spreadsheet...

Hello all,

I'm a newbie when it comes to scripting so I apologize in advance.
I'm trying to create a script that performs three tasks:

1. Removes specific columns from an existing spreadsheet
2. Changes the date format in a particular column to mm/dd/yyyy
3. Saves the results as a .csv.

Is there any way to make this happen? I'm going to need help with the
full script, from beginning to end.

Thank you

My System SpecsSystem Spec
Old 01-21-2009   #2 (permalink)
Pegasus \(MVP\)


 
 

Re: Deleting specific columns in an Excel spreadsheet...


"centre21" <centre21@xxxxxx> wrote in message
news:5b86fec9-61fa-4e6d-a484-5e02fda4bb80@xxxxxx
Quote:

> Hello all,
>
> I'm a newbie when it comes to scripting so I apologize in advance.
> I'm trying to create a script that performs three tasks:
>
> 1. Removes specific columns from an existing spreadsheet
> 2. Changes the date format in a particular column to mm/dd/yyyy
> 3. Saves the results as a .csv.
>
> Is there any way to make this happen? I'm going to need help with the
> full script, from beginning to end.
>
> Thank you
Here you go:
Quote:

> 1. Removes specific columns from an existing spreadsheet
oSheet.Range("B1:B1").EntireColumn.delete
Quote:

> 2. Changes the date format in a particular column to mm/dd/yyyy
oSheet.Range("A1:A1").EntireColumn.NumberFormat = "mm/dd/yyyy"
Quote:

> 3. Saves the results as a .csv.
oExcel.ActiveWorkbook.SaveAs "d:\test.csv", 6

You'll have to put in a bit of your own time and effort to wrap it all up in
a complete script.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
create Excel spreadsheet without loading Excel VB Script
Excel Spreadsheet Problem Microsoft Office
Excel Spreadsheet Help Software
Hyperlink from web page to specific cell in specific Excel sheet VB Script
EXCEL spreadsheet running slow Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46