?
Solved

VBScript to delete rows in excel

Posted on 2004-04-27
5
Medium Priority
?
262 Views
Last Modified: 2013-12-25
I need to delete the rows in an excel spreadsheet prior to being reloaded by a DTS transformation.
The needs to run as VB script as part of an activex transformation.
0
Comment
Question by:howertja
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 29

Expert Comment

by:leonstryker
ID: 10931719
What do you have so far?  Why not do this directly from Excel?

Leon
0
 

Author Comment

by:howertja
ID: 10932388
I am selecting records from a SQL database and placing the info in a spreadsheet to mail to a user. If I created a csv file, a new file would be created each time. With a transformation to excel, it appends the sheet. I need to delete the old data and load the new. Loading is not a problem. The transformation handles that. I would just create a csv file and email that but the user is not very knowledgable on how to load it to a spreadsheet.

By the way, this package will run as a scheduled batch process.
0
 
LVL 29

Accepted Solution

by:
leonstryker earned 500 total points
ID: 10932424
CSV is a format recognized natively in Excel.  In fact, if you have Excel installed on your machine and a CSV file is duoble clicked it will be opened in Excel.

Leon
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 6 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question