ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   creating Excel with text (https://www.excelbanter.com/excel-programming/298103-re-creating-excel-text.html)

Bob Phillips[_7_]

creating Excel with text
 
No, a text file doesn't hold all the detail about formatting. That is partly
why Excel files are much bigger than text files, it contains that formatting
data within it.

There is a Rich Text Format file type (RTF), which holds some formatting
details when opened in Word, but I haven't tried opening one of those in
Excel, but it won't do what you want.

--
HTH

-------

Bob Phillips
"kotayya" wrote in message
...
Hi

Where can I get information about creating an Excel file with a text file.

I want to create a text file with formatting and all the data and open it
with Excel. Is it possible. Any help will be appreciated.

Thank you




Steve Garman

creating Excel with text
 
Theoretically, XML might be a possibility but I wouldn't like to try it
myself.

Bob Phillips wrote:
No, a text file doesn't hold all the detail about formatting. That is partly
why Excel files are much bigger than text files, it contains that formatting
data within it.

There is a Rich Text Format file type (RTF), which holds some formatting
details when opened in Word, but I haven't tried opening one of those in
Excel, but it won't do what you want.



Bob Phillips[_6_]

creating Excel with text
 
Good point. XML with XSLT will be (should be) the default in future. It
should work in Excel 2002+ (although I admit to never having done it
myself<vbg).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Steve Garman" wrote in message
...
Theoretically, XML might be a possibility but I wouldn't like to try it
myself.

Bob Phillips wrote:
No, a text file doesn't hold all the detail about formatting. That is

partly
why Excel files are much bigger than text files, it contains that

formatting
data within it.

There is a Rich Text Format file type (RTF), which holds some formatting
details when opened in Word, but I haven't tried opening one of those in
Excel, but it won't do what you want.





Abhinav[_3_]

creating Excel with text
 


Steve Garman wrote:

Theoretically, XML might be a possibility but I wouldn't like to try it
myself.

AFAIK, openoffice does this XML Thing ... :)

Regards
Abhinav

Bob Phillips wrote:

No, a text file doesn't hold all the detail about formatting. That is
partly
why Excel files are much bigger than text files, it contains that
formatting
data within it.

There is a Rich Text Format file type (RTF), which holds some formatting
details when opened in Word, but I haven't tried opening one of those in
Excel, but it won't do what you want.




Steve Garman

creating Excel with text
 
Abhinav wrote:


Steve Garman wrote:

Theoretically, XML might be a possibility but I wouldn't like to try
it myself.


AFAIK, openoffice does this XML Thing ... :)


So does xl2002

Here's a whole workbook for you :-)

<?xml version="1.0"?
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40"
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"
<AuthorSteve Garman</Author
<LastAuthorSteve Garman</LastAuthor
<Created2004-05-13T12:00:23Z</Created
<Version10.6626</Version
</DocumentProperties
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"
<DownloadComponents/
<LocationOfComponents HRef="file:///\\"/
</OfficeDocumentSettings
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"
<WindowHeight9210</WindowHeight
<WindowWidth11355</WindowWidth
<WindowTopX480</WindowTopX
<WindowTopY15</WindowTopY
<ProtectStructureFalse</ProtectStructure
<ProtectWindowsFalse</ProtectWindows
</ExcelWorkbook
<Styles
<Style ss:ID="Default" ss:Name="Normal"
<Alignment ss:Vertical="Bottom"/
<Borders/
<Font/
<Interior/
<NumberFormat/
<Protection/
</Style
<Style ss:ID="s21"
<Font ss:Size="12" ss:Color="#FF0000" ss:Bold="1"/
</Style
</Styles
<Worksheet ss:Name="Sheet1"
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1"
x:FullColumns="1"
x:FullRows="1"
<Row ss:Height="15.75"
<Cell ss:StyleID="s21"<Data ss:Type="String"Hello
World!</Data</Cell
</Row
</Table
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"
<Print
<ValidPrinterInfo/
<PaperSizeIndex9</PaperSizeIndex
<HorizontalResolution600</HorizontalResolution
<VerticalResolution0</VerticalResolution
</Print
<Selected/
<ProtectObjectsFalse</ProtectObjects
<ProtectScenariosFalse</ProtectScenarios
</WorksheetOptions
</Worksheet
</Workbook



All times are GMT +1. The time now is 01:45 PM.

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