ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formatting Cells/Columns in Excel 97 (https://www.excelbanter.com/excel-programming/275519-re-formatting-cells-columns-excel-97-a.html)

Wild Bill[_2_]

Formatting Cells/Columns in Excel 97
 
Do you want a programming solution or to do it without programming?
Also by GENERAL(6) do you mean numeric to 6 places? A 3 by 3 range of
sample data "before" and a 3 by 3 range of (desired) "after" would help,
including both numeric and alphabetic data.

On Thu, 28 Aug 2003 00:57:32 -0700, "Daryl" wrote:

Hi Guys,

Sorry if I sound real stupid but is there anyway that we
can control the column formatting in Excel 97 like let's
say column A = GENERAL(6), column B = GENERAL(4), column C
= TEXT(18) etc?

Appreciate any form of advice, thanks!!



Daryl Ho

Formatting Cells/Columns in Excel 97
 
Actually I'm supposed to extract some data from an InterBase database
server (using Borland Delphi) and dump them into an excel file.

However the exported excel field requirements I was given stated all
these stuffs like Column A = GENERAL (Size 6), Column B = GENERAL (Size
4), Column C = TEXT (Size 20) etc. Thus it's somewhat like a fixed width
column excel file that my client can import into their own programs.

I'm just real puzzled if Excel 97 is able to format the columns to this
extent (fixed width and different field type) so I thought I had better
snoop around here first before I call them back.

Hope this clears up the air. Thanks!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Wild Bill[_2_]

Formatting Cells/Columns in Excel 97
 
Excel does not have that kind of byte width designation on fields. Each
cell will hold any size of data you put there (up to certain very large
limits) without any width specification. You can also explore Excel
cell formatting by choosing the menu item "Format" and clicking "Cells."

On Thu, 28 Aug 2003 01:38:40 -0700, Daryl Ho wrote:

Actually I'm supposed to extract some data from an InterBase database
server (using Borland Delphi) and dump them into an excel file.

However the exported excel field requirements I was given stated all
these stuffs like Column A = GENERAL (Size 6), Column B = GENERAL (Size
4), Column C = TEXT (Size 20) etc. Thus it's somewhat like a fixed width
column excel file that my client can import into their own programs.

I'm just real puzzled if Excel 97 is able to format the columns to this
extent (fixed width and different field type) so I thought I had better
snoop around here first before I call them back.

Hope this clears up the air. Thanks!


Tom Ogilvy

Formatting Cells/Columns in Excel 97
 
Look in excel in the menu data. Then Get External Data. This provides a
wizard for importing data into Excel. Since this appears to be a database,
then the information on field/data types will be automatically captured from
the database (more than likely - I don't have experience with the InterBase
database).

You can turn on the macro recorder while doing it manually to see the code
one would use in VBA.

Since you are doing this from Delphi, you could open an instance of excel
and run such a macro using OLE Automation.

Another way would be to open excel using OLE Automation, then write the data
from your program into the worksheet.

Another way would be to use ADO

Although VB based, this page illustrates sample code for putting data in
Excel using ADO:
http://www.erlandsendata.no/english/vba/adodao/



--
Regards,
Tom Ogilvy





"Daryl Ho" wrote in message
...
Actually I'm supposed to extract some data from an InterBase database
server (using Borland Delphi) and dump them into an excel file.

However the exported excel field requirements I was given stated all
these stuffs like Column A = GENERAL (Size 6), Column B = GENERAL (Size
4), Column C = TEXT (Size 20) etc. Thus it's somewhat like a fixed width
column excel file that my client can import into their own programs.

I'm just real puzzled if Excel 97 is able to format the columns to this
extent (fixed width and different field type) so I thought I had better
snoop around here first before I call them back.

Hope this clears up the air. Thanks!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com