|
-
Jul 31st, 2008, 09:32 PM
#1
Saving an Excel 2007 worksheet but in 2003 format?
Hi all
I'm creating a new worksheet using Excel 2007 and then i save it to file. How would i be able to specify the format to be compatible with Excel 2003?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 31st, 2008, 09:39 PM
#2
Re: Saving an Excel 2007 worksheet but in 2003 format?
Hey MP hows it going? Long time no post lol.
Just open the workbok and raise the .SaveAs passing "xlExcel8" as the FileFormat argument.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 1st, 2008, 03:34 AM
#3
Re: Saving an Excel 2007 worksheet but in 2003 format?
Hi Rob,
for some reason it crashes when i try that. It works if I try xlWorkbookNormal, but if i try xlExcel8 it throws:
{System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC
any ideas?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 1st, 2008, 06:52 AM
#4
Hyperactive Member
Re: Saving an Excel 2007 worksheet but in 2003 format?
Running any plugins in Excel 2007? Sounds like one of them crashed or didn't respond too well to the command
If you found any of my posts helpful then please rate them.
CodeBank
Form Fading Effects in VB.NET and C#
-
Aug 1st, 2008, 12:27 PM
#5
Re: Saving an Excel 2007 worksheet but in 2003 format?
I dont have 2007 at this location so I can check it tonight.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 1st, 2008, 12:28 PM
#6
Re: Saving an Excel 2007 worksheet but in 2003 format?
nope it's a plane installation
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 1st, 2008, 08:02 PM
#7
Hyperactive Member
Re: Saving an Excel 2007 worksheet but in 2003 format?
Hi,
You don't by any chance have something like Acrobat installed do you?
Sam
If you found any of my posts helpful then please rate them.
CodeBank
Form Fading Effects in VB.NET and C#
-
Aug 1st, 2008, 08:04 PM
#8
Re: Saving an Excel 2007 worksheet but in 2003 format?
hmm yea i have acrobat reader... why?
Funny thing is using this format works fine: xlExcel9795
Is there any particular reason why that version would work and excel 8 wouldnt work? is there any downside in using the older 9795 version?
edit: uuh okay i tried xlExcel9795 on another computer that has office 2007 installed on it, and it throws that exception. It runs fine on the computer that has office 2003 installed on it
Last edited by MrPolite; Aug 1st, 2008 at 08:14 PM.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 1st, 2008, 08:31 PM
#9
Re: Saving an Excel 2007 worksheet but in 2003 format?
this works so far, but it seems more like a "hack" to me... anyone can tell me why this is failing depending on what version of office I'm running?
PHP Code:
if (app.Version == "11.0") format = Excel.XlFileFormat.xlWorkbookNormal; //This format would throw an exception if the machine has office 2007 else if (app.Version == "12.0") format = Excel.XlFileFormat.xlExcel8; //This would throw an exception if we're running office 2003
(yea that's C# but it looks 'near' identical in VB )
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 2nd, 2008, 01:25 PM
#10
Hyperactive Member
Re: Saving an Excel 2007 worksheet but in 2003 format?
Hi,
In Office 2003, you can save as:
- 2003
- 2002
In Office 2007 you can save as either:
- 2007 (docX) file
- 97-2003 (doc file)
So saving in 2007 it is at lowest 8 and at highest 11, try saving as either ver 8 or ver 11.
My theory about Acrobat was just an instability but it seems more of an Office issue.
Office 2007 treats all backward compatible documents as the same class unlike Office 2003 (although if you have Office 2007 on the same it changes behaviour).
You will have to use your hack
If you found any of my posts helpful then please rate them.
CodeBank
Form Fading Effects in VB.NET and C#
-
Aug 2nd, 2008, 04:26 PM
#11
Re: Saving an Excel 2007 worksheet but in 2003 format?
aah i see
well thanks for your help!
hopefully this works fine for now
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|