Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel formatting saved in a database?

Hi
Our CEO has come up with an 'idea'
He wants to save the formatting of a sheet and export it to a database.
Then, later - retrieve this formatting data and read in data from our 4GL
application so it is formatted in the desired manner (Excel already reads in
the data from 4GL via an addin).
This is so the users only have to push 'one button' to save their formatting
and 'one button' to get it back.

Now this sounded fantastically complicated as who knows what formatting they
will have applied to cells/ranges/sheets and the interrogation would be
excessive. So we thought we would just save a *.xls or *.xlt of the sheet
with formatting and then read the file back in and save it as a binary
object in the database (SQL Server or Oracle). However, I don't see that
there is a way for Excel to be able to read in an XLS/XLT file and write it
to a database. It just deals in TextStreams?

Is this proposal just not possible with Excel and its VBA?

Thanks

Paul


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Excel formatting saved in a database?

You would have to query the DB (using ADO is one way) to retrieve the blob.
Reconstruct it on disk as a file. Then XL could open it.
VBA can accomplish that.

NickHK

"Paul C" bl...
Hi
Our CEO has come up with an 'idea'
He wants to save the formatting of a sheet and export it to a database.
Then, later - retrieve this formatting data and read in data from our 4GL
application so it is formatted in the desired manner (Excel already reads
in the data from 4GL via an addin).
This is so the users only have to push 'one button' to save their
formatting and 'one button' to get it back.

Now this sounded fantastically complicated as who knows what formatting
they will have applied to cells/ranges/sheets and the interrogation would
be excessive. So we thought we would just save a *.xls or *.xlt of the
sheet with formatting and then read the file back in and save it as a
binary object in the database (SQL Server or Oracle). However, I don't see
that there is a way for Excel to be able to read in an XLS/XLT file and
write it to a database. It just deals in TextStreams?

Is this proposal just not possible with Excel and its VBA?

Thanks

Paul



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Excel formatting saved in a database?

If you're already reading data from the 4GL then why don't you have an
Excel Template (and empty Workbook) and keep the formatting in that?

The way I see it the Template would have VBA macros that would analyze
the data and add formatting, that way the number of rows returned from
the 4GL can vary.

As to whether it's possible. If it's a matter of saving column widths,
title fonts and simple stuff, why not?

Regarding the excessive iteration, you can get around the slowness by
doing the formatting 50 rows at a time. Keep in mind the selection does
not have to be contigous.

BTW, it is absolutely possible to write the data from a Worksheet to an
xml file - so later it can be transformed into XSLT.

In fact, you can save the data as xml and use Excel (2003 or later) to
transform and format the data. That is, Excel has some built in
transformation/formatting stuff built in.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loss of formatting when saved as .xls file clandtech Excel Discussion (Misc queries) 0 February 4th 10 05:00 PM
How do I recover an Excel document saved not saved as Darryl Excel Discussion (Misc queries) 6 January 5th 10 03:39 AM
Formatting not saved when file re-opened rzink Excel Discussion (Misc queries) 0 December 14th 09 06:18 PM
XL 2007: Conditional formatting not saved properly Pere Pete Excel Discussion (Misc queries) 0 August 17th 07 02:05 AM
Formatting not saved Ariadna Excel Discussion (Misc queries) 0 March 9th 06 07:39 PM


All times are GMT +1. The time now is 01:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"