Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #11812 > unrolled thread

Re: Excel SaveAs Fileformat

Started byabhi.unicorn.g@gmail.com
First post2018-01-22 13:49 -0800
Last post2018-01-23 20:20 +0700
Articles 3 — 3 participants

Back to article view | Back to microsoft.public.scripting.vbscript

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Excel SaveAs Fileformat abhi.unicorn.g@gmail.com - 2018-01-22 13:49 -0800
    Re: Excel SaveAs Fileformat "Mayayana" <mayayana@invalid.nospam> - 2018-01-22 17:47 -0500
    Re: Excel SaveAs Fileformat JJ <jj4public@vfemail.net> - 2018-01-23 20:20 +0700

#11812 — Re: Excel SaveAs Fileformat

Fromabhi.unicorn.g@gmail.com
Date2018-01-22 13:49 -0800
SubjectRe: Excel SaveAs Fileformat
Message-ID<a14f0d5e-e4e1-4c62-ac3d-449808d18859@googlegroups.com>
On Sunday, April 9, 2006 at 11:09:32 AM UTC+5:30, y sakuda wrote:
> "MichaelHensley" <mhensley@news.postalias> wrote in message 
> news:ukPwjM5WGHA.4976@TK2MSFTNGP03.phx.gbl...
> > Note: for those playing along at home, it looks like the value for 
> > "xlNormal" is 1.
> >
> Sorry. I misread as you want to Save as CSV.
> If you want to save as current version, you don't need to
> specify second parameter.
> objExcel.ActiveWorkbook.SaveAs "Foobar.xls"
> 
>                                        y sakuda from JPN

hello i am using following script to covert xlsx to csv

xlsconvert.vbs includes following code:

Set objExcel = CreateObject("Excel.Application") 
Set objWorkbook = objExcel.Workbooks.Open(Wscript.Arguments(0)) 
objExcel.Application.Visible = False 
objExcel.Application.DisplayAlerts = False 
objExcel.ActiveWorkbook.SaveAs Wscript.Arguments(1), 56 
objExcel.ActiveWorkbook.Close 
objExcel.Application.DisplayAlerts = True 
objExcel.Application.Quit 
WScript.Quit

i am getting the same error that "SaveAs method of Workbook class failed"

i am executing it with batch file in batch file i have written as:
cscript D:\INFA_AGI_DEV_QA\10.1.0\server\infa_shared\Utilities\putty\xlsconvert.vbs \\10.44.194.42\Sap_bw_dev\interfaces\InBound\BCS\BCS_BW_100_0102017.xlsx \\10.44.194.42\Sap_bw_dev\interfaces\InBound\BCS\BCS_BW_100_0102017_01.csv

[toc] | [next] | [standalone]


#11813

From"Mayayana" <mayayana@invalid.nospam>
Date2018-01-22 17:47 -0500
Message-ID<p45pll$6uf$1@dont-email.me>
In reply to#11812
<abhi.unicorn.g@gmail.com> wrote

| On Sunday, April 9, 2006 at 11:09:32...

  12 years ago that was posted! How about
getting a real newsreader and connecting to
a usenet server. Google groups is no way
to do newsgroups.

Here's a free newsgroup server:

http://www.eternal-september.org/

   If you don't have software you can use
Thunderbird. 

[toc] | [prev] | [next] | [standalone]


#11814

FromJJ <jj4public@vfemail.net>
Date2018-01-23 20:20 +0700
Message-ID<1qfp15xsxg4yv.pf7nlbj3bbbc.dlg@40tude.net>
In reply to#11812
On Mon, 22 Jan 2018 13:49:13 -0800 (PST), abhi.unicorn.g@gmail.com wrote:
> 
> hello i am using following script to covert xlsx to csv
> 
> xlsconvert.vbs includes following code:
> 
> Set objExcel = CreateObject("Excel.Application") 
> Set objWorkbook = objExcel.Workbooks.Open(Wscript.Arguments(0)) 
> objExcel.Application.Visible = False 
> objExcel.Application.DisplayAlerts = False 
> objExcel.ActiveWorkbook.SaveAs Wscript.Arguments(1), 56 
> objExcel.ActiveWorkbook.Close 
> objExcel.Application.DisplayAlerts = True 
> objExcel.Application.Quit 
> WScript.Quit
> 
> i am getting the same error that "SaveAs method of Workbook class failed"
> 
> i am executing it with batch file in batch file i have written as:
> cscript D:\INFA_AGI_DEV_QA\10.1.0\server\infa_shared\Utilities\putty\xlsconvert.vbs \\10.44.194.42\Sap_bw_dev\interfaces\InBound\BCS\BCS_BW_100_0102017.xlsx \\10.44.194.42\Sap_bw_dev\interfaces\InBound\BCS\BCS_BW_100_0102017_01.csv

Wrong file format number. Number 56 is for Excel v8 format, not CSV format.
See the Excel Developer Reference.

That error is likely due to newer Office/Excel versions not supporting
saving into older Excel formats other than v97-2003 format.

[toc] | [prev] | [standalone]


Back to top | Article view | microsoft.public.scripting.vbscript


csiph-web