[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Hide First Row Excel CSV Export VB Script

Posted on 2014-02-20
2
Medium Priority
?
345 Views
Last Modified: 2014-02-20
I recently asked a question regarding a script for exporting from excel using a pipe as a delimiter.  The question was answered here: http://rdsrc.us/uIDJ0F and works very well.  However, I would also like to hide the first row from being exported when using the script from the other question.  Let me know if there is any easy way to leverage the existing script, to hide the first row.

Thanks!
0
Comment
Question by:colonialiu20
[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 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 2000 total points
ID: 39874119
Not a straightforward way but I'd do it by creating a temporary sheet without the first row

Sub DoTheExport()

'turn off updates to speed up code execution
With Application
    .ScreenUpdating = False
    .EnableEvents = False
    .Calculation = xlCalculationManual
    .DisplayAlerts = False
End With

ActiveSheet.Copy

ActiveSheet.Rows(1).Delete

ExportToTextFile FName:="MacSSD512:Users:byundt:Desktop:Old HP drive:VBA:Sample '14:Test.txt", Sep:="|", _
       SelectionOnly:=False, AppendData:=False

ActiveWorkbook.Close (False)

With Application
    .ScreenUpdating = True
    .EnableEvents = True
    .Calculation = xlCalculationAutomatic
    .DisplayAlerts = True
End With

End Sub

Open in new window

0
 

Author Comment

by:colonialiu20
ID: 39874460
I was able to make it work.  Thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

656 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