| View previous topic :: View next topic |
| Author |
Message |
mnulph Newbie

Joined: 24 Aug 2010 Posts: 4
|
Posted: Tue Aug 24, 2010 7:17 am Post subject: Opening an xls file |
|
|
Hi, I am new to open office and am having trouble opening an xls file. I download this file from a supplier and it has a list of barcodes and descriptions in it. I want to open it and then save it as a csv file. The file has the information in an html table, but the file extension is xls. To get the file to open in Calc, I started Calc, choose File, Open and then in the File Type dropdown I choose Txt CSV. Then I choose my file and click open. Next I get a pop-up titled "Text Import" I can choose the column separtator, but there is only one long column. And Ideas on what I should do?
The File I am working with starts out like this:
<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>
<head><META HTTP-EQUIV='CONTENT-TYPE' CONTENT='application/vnd.ms-excel'>
<style> <!-- .Text { TEXT-ALIGN: left; mso-style-parent: text; mso-number-format: \@ } .DateMMddyyyy { TEXT-ALIGN: left; mso-number-format: 'mm\/dd\/yyyy'; } .DateddMMyyyy { TEXT-ALIGN: left; mso-number-format: 'dd\/mm\/yyyy'; } .BasisWeight { mso-style-parent: text; mso-number-format: '0.0' } .MeasureI { TEXT-ALIGN: right; mso-number-format: '0.00' } .MeasureM { TEXT-ALIGN: right; mso-number-format: '0' } .MeasureAdj { TEXT-ALIGN: right; mso-number-format: '0.00' } .DetailWeight { mso-number-format: '0' } .DetailWeightAdj { mso-number-format: '0.0' } .SummaryWeight { mso-number-format: '0.000' } .SummaryWeightAdj { mso-number-format: '0.0000' } .Currency { mso-number-format: '_('$ '* #,##0.00_);_('$ '* \(#,##0.00\);_('$ '* '-'??_);_(@_)'; mso-style-name: Currency; mso-style-id: 4 } .Percent { mso-number-format: '0.00\%' } .Number { mso-number-format: General } --> </style>
<!--[if gte mso 9]><xml><x:ExcelWorkbook> <x:ExcelWorksheets><x:ExcelWorksheet><x:Name>Reports</x:Name><x:WorksheetOptions><x:Print><x:ValidPrinterInfo/></x:Print></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--> </xml><![endif]-->
</head><body>
<table cellspacing="0" border="0" id="wgrdReportGrid" style="border-collapse:collapse;">
<tr style="font-weight:bold;">
<td>Bar Code</td><td>Product Group</td><td>Diameter (in)</td><td>Width (in)</td><td>Order</td><td>Lot</td><td>Vehicle ID</td><td>Manifest Number</td><td>Mill Code</td><td>Mill Location</td><td>Manufacture Date</td><td>Original Weight (lb)</td><td>Current Weight (lb)</td><td>Location</td><td>Cost</td>
</tr><tr>
<td class="Text">046927080001A</td><td class="Text">HBW500FV92</td><td class="MeasureI">40.0000</td><td class="MeasureI">13.0000</td><td class="Text">08222010D</td><td class="Number">1</td><td class="Text">1</td><td class="Text">1</td><td class="Text">X1</td><td class="Text">Roosevelt</td><td class="DateMMddyyyy">08/22/2010</td><td class="DetailWeightAdj">456.0000</td><td class="DetailWeightAdj">456.0000</td><td class="Text">/</td><td class="Currency">223.44000000</td>
</tr><tr>
Thanks |
|
| Back to top |
|
 |
peterroots Super User


Joined: 01 Nov 2006 Posts: 592 Location: United Kingdom
|
Posted: Tue Aug 24, 2010 9:03 am Post subject: |
|
|
How about File>Open>Pick the file name and press OK?
Why are you changing the file type to txt CVS when it is an xls file? _________________ Kubuntu 11.10 LibreOffice3.4.4 |
|
| Back to top |
|
 |
mnulph Newbie

Joined: 24 Aug 2010 Posts: 4
|
Posted: Wed Aug 25, 2010 8:01 am Post subject: |
|
|
| Tried doing that, but the document opens up in Writer/Web instead of in Calc. This does not allow me to save the file in a csv format. Need to change to a CSV because the application which uses this file requires it. |
|
| Back to top |
|
 |
peterroots Super User


Joined: 01 Nov 2006 Posts: 592 Location: United Kingdom
|
Posted: Wed Aug 25, 2010 10:00 am Post subject: |
|
|
sorry I did not look at the code you posted closely before answering. Still I wonder why you are choosing CVS when you open the file. It is not a CVS file. Yes, you want it to be a CVS but you need to choose CVS when you save it not when you open it.
Looking more closely at the code, it seems your file is an xml file so most certainly not an excel .xls file. It looks a bit like an MS office XML file example I looked at on wikipedia but not exactly like the example. You could try opening it as an MS office excel 2003 XML file or as an MS office excel 2007 file, in openoffice.org and see if that helps. _________________ Kubuntu 11.10 LibreOffice3.4.4 |
|
| Back to top |
|
 |
mnulph Newbie

Joined: 24 Aug 2010 Posts: 4
|
Posted: Thu Aug 26, 2010 4:44 am Post subject: |
|
|
Thanks for the help, Tried opening the file in Excel 2003, but the only files that option will let me open have the .xml extension. So I changed the file extension to .xml and tried to open it, but nothing happened. It looks like it opened the file because the file name is up it the title bar, but no data in the cells. So I changed the file extension back and tried to open it using Excel 97/2000/XP and got a popup that said "Unknown or Unsupported Excel File Format" So I tried Excel 4.x 5.0/95 and it opens in Writer/Web again.
Thanks for your time and input. It is appreciated. |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Thu Aug 26, 2010 4:57 am Post subject: |
|
|
Do yourself a favour and learn how to open any file with any application you want regardless of the file name extension.
No matter what the file name extension suggests, your file contains HTML (typical web page content) created by MS Excel, designed to be read by some internet browser or Excel itself.
Create a new Calc spreadsheet.
menu:Insert>Link to External data...
This menu item is designed to import named tables from within spreadsheets and HTML files.
Hit the [...] button, point to the html file
From the list box you choose the named table(s) you want to import [Ctrl+Click for multiple selections] _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
mnulph Newbie

Joined: 24 Aug 2010 Posts: 4
|
Posted: Thu Aug 26, 2010 5:54 am Post subject: |
|
|
Thank for taking the time to help. Here is what I did:
I opened Calc. It comes up with a blank worksheet. I choose Menu: Insert > Link to External Data. After I Hit the [...] button and point to my file I get a Pop-up titled "Text Import" where I get to choose the import Character Set and the Separator Options. Have tried different options but I never get a table to choose in the External Data pop up. Am I doing something wrong? I am using OpenOffice Version 3.2.1
Thanks |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Thu Aug 26, 2010 1:59 pm Post subject: |
|
|
No idea why the table does not import, but it loads into my browser.. Get the free Excel viewer from MS or load it into your internet browser. From there you can copy the cell values into a spreadsheet if you know how to deal with columns of text, numeric text, numbers and dates. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
|