how to save the Excel file as CSV file using VBScript?

5,652 views
Skip to first unread message

Mathi_QA Engineer

unread,
Oct 1, 2008, 3:27:59 AM10/1/08
to QTP - HP Quick Test Professional - Automated Software Testing
how to save the Excel file as CSV file using VBScript?

Mathi_QA Engineer

unread,
Oct 1, 2008, 3:35:33 AM10/1/08
to QTP - HP Quick Test Professional - Automated Software Testing
Hi all,
I have got the solution,
Anyway thanks :)

Ganesh muralidharan

unread,
Oct 1, 2008, 3:37:42 AM10/1/08
to Mercu...@googlegroups.com
Hi Mathi,

Is the solution only of changing the file name as .csv or any other way of doing it. Kindly share it with the group.
--
Ganesh Muralidharan
Wipro Technologies
Mob. : 9341023574

'God Never Forgets'

Roman Zilber

unread,
Oct 1, 2008, 9:42:30 AM10/1/08
to Mercu...@googlegroups.com
Ganesh,

If you think the solution is "only of changing the file name as .csv", you don't have to post it to the group. You can try it by yourself. It takes about 20 seconds. It wasn't a quiz question.

Roman

Ganesh muralidharan

unread,
Oct 1, 2008, 9:49:28 AM10/1/08
to Mercu...@googlegroups.com
Roman,

My query to Mathi was to share the solution found by him and that I put as a query to Mathi. I hope thats not a crime.

Roman Zilber

unread,
Oct 1, 2008, 9:58:02 AM10/1/08
to Mercu...@googlegroups.com
It is not. I only don't think it is a good idea to turn the group into a chat room. Please don't take it personally, but there are too many wrong answers and strange questions.

http://msdn.microsoft.com/en-us/library/bb214129.aspx
http://msdn.microsoft.com/en-us/library/bb241279.aspx

Roman

Mathi_QA Engineer

unread,
Oct 3, 2008, 6:15:25 AM10/3/08
to QTP - HP Quick Test Professional - Automated Software Testing
Hi,
The solution is not only changing the name.
Solution is,

Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.DisplayAlerts = False
ExcelObj.Visible = true ' or false
ExcelObj.Workbooks.Open "C:\Book1.xls"
ExcelObj.Workbooks(1).SaveAs "C:\Book2.csv", 6


Now the file can be changed into CSv file. 6 is for file format CSV.


On Oct 1, 6:58 pm, "Roman Zilber" <rzil...@gmail.com> wrote:
> It is not. I only don't think it is a good idea to turn the group into a
> chat room. Please don't take it personally, but there are too many wrong
> answers and strange questions.
>
> http://msdn.microsoft.com/en-us/library/bb214129.aspxhttp://msdn.microsoft.com/en-us/library/bb241279.aspx
>
> Roman
>
> On Wed, Oct 1, 2008 at 9:49 AM, Ganesh muralidharan <mgkgan...@gmail.com>wrote:
>
>
>
> > Roman,
>
> > My query to Mathi was to share the solution found by him and that I put as
> > a query to Mathi. I hope thats not a crime.
>
> > On Wed, Oct 1, 2008 at 7:12 PM, Roman Zilber <rzil...@gmail.com> wrote:
>
> >> Ganesh,
>
> >> If you think the solution is "only of changing the file name as .csv", you
> >> don't have to post it to the group. You can try it by yourself. It takes
> >> about 20 seconds. It wasn't a quiz question.
>
> >> Roman
>
> >> On Wed, Oct 1, 2008 at 3:37 AM, Ganesh muralidharan <mgkgan...@gmail.com>wrote:
>
> >>> Hi Mathi,
>
> >>> Is the solution only of changing the file name as .csv or any other way
> >>> of doing it. Kindly share it with the group.
>
> >>> On Wed, Oct 1, 2008 at 1:05 PM, Mathi_QA Engineer <mathipra...@gmail.com
> >>> > wrote:
>
> >>>> Hi all,
> >>>> I have got the solution,
> >>>> Anyway thanks :)
>
> >>>> On Oct 1, 12:27 pm, Mathi_QA Engineer <mathipra...@gmail.com> wrote:
> >>>> > how to save the Excel file as CSV file using VBScript?
>
> >>> --
> >>> Ganesh Muralidharan
> >>> Wipro Technologies
> >>> Mob. : 9341023574
>
> >>> 'God Never Forgets'
>
> > --
> > Ganesh Muralidharan
> > Wipro Technologies
> > Mob. : 9341023574
>
> > 'God Never Forgets'- Hide quoted text -
>
> - Show quoted text -

Roman Zilber

unread,
Oct 3, 2008, 9:59:04 AM10/3/08
to Mercu...@googlegroups.com
> Now the file can be changed into CSv file. 6 is for file format CSV.

I'd choose:

xlCSVMSDOS  - 24  -  MSDOS CSV

rajesh P

unread,
Aug 6, 2016, 11:34:09 AM8/6/16
to QTP - HP Quick Test Professional - Automated Software Testing, Mercu...@googlegroups.com, mathi...@gmail.com
hi
can you send that code... I need to convert excel file as CSV, but getting error, 'subscript out of range'..

sekhar djk

unread,
Aug 7, 2016, 11:05:45 PM8/7/16
to mercu...@googlegroups.com

What is the solution.


--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mercuryqtp+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages