Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed ExcelFormatter XML output to load correctly into Excel #3

Open
wants to merge 1 commit into from

4 participants

@tobysmith

This removed the "Problems came up during load" message for me..

I changed the namespace of the ExcelWorkbook tags from ss: (xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet") to x: (xmlns:x="urn:schemas-microsoft-com:office:excel").

I also removed the CDATA from the cells to be able to get the cell data to display, otherwise they were coming up blank.

@tobysmith tobysmith Fixed excelFormatter XML output
I changed the namespace of the ExcelWorkbook tags from ss:
(xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet") to x:
(xmlns:x="urn:schemas-microsoft-com:office:excel").

I also removed the CDATA from the cells to be able to get the cell data
to display, otherwise they were coming up blank.
61bcbc0
@iwiznia
Owner

What's the difference between ss: (xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet") and x: (xmlns:x="urn:schemas-microsoft-com:office:excel"??
I have no idea what the difference may be, have you had problems with the previous implementation?
The code for the excel xml comes from edspencer's plugin so I don't really know what's going on there....
Will the change make this not compatible with non excel spreadsheet programs (openoffice, etc)?

@tobysmith

I had the same problem as in issue #8..

Problems came up in the following ares during load:
*Uknown
*Style

Checking the Excel log files have shown this:

XML ERROR in ExcelWorkbook description
REASON: Missing Tag
FILE: download.xls:users:stotes:desktop:download.xls
GROUP: Styles
TAG: Style
ATTRIB: ID

I checked though and couldn't seem to find anything wrong with the styles tags.

I haven't checked it with openoffice or anything else either, I'll do that and report back soon.

-----EDIT------

Okay this doesn't work in LibreOffice, get an "input/output error"

@iwiznia
Owner

ok, thanks. Also, the example was outdated and didn't work because it was written for edspencer's plugin.
I have to update the readme and create and example.. I'll do that when I find some spare time...
The strange think is that I'm using this with no rpoblems on excel and openofice (and it's variation libreoffice)....

@stotes

I'm still experiencing this error in Ext 3.2.1.
Problems came up in the following ares during load:
*Uknown
*Style

Any ideas on how I may resolve this?

@iwiznia
Owner

Stotes, this plugin is for Ext 4. It won't work for Ext 3, use edspencer's version for compatibility.

@lisaWriteJava

Is it possible to use a different image file for downloadify? I made a change in the code for my application to use a .png file that I have for an excel download. It flickers and then it disappears and the download doesn't work. When I use the .png file that comes with the exporter everything works fine. Not sure what the issue could be.

@iwiznia
Owner

If you open the provided image, you can see it has 4 states. Your image has to be like that too. Also, if your image has different size, you should set the width and height in the button config.

@lisaWriteJava

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 10, 2011
  1. @tobysmith

    Fixed excelFormatter XML output

    tobysmith authored
    I changed the namespace of the ExcelWorkbook tags from ss:
    (xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet") to x:
    (xmlns:x="urn:schemas-microsoft-com:office:excel").
    
    I also removed the CDATA from the cells to be able to get the cell data
    to display, otherwise they were coming up blank.
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 9 deletions.
  1. +2 −2 excelFormatter/Cell.js
  2. +7 −7 excelFormatter/Workbook.js
View
4 excelFormatter/Cell.js
@@ -21,7 +21,7 @@ Ext.define("Ext.ux.exporter.excelFormatter.Cell", {
tpl: new Ext.XTemplate(
'<ss:Cell ss:StyleID="{style}">',
- '<ss:Data ss:Type="{type}"><![CDATA[{value}]]></ss:Data>',
+ '<ss:Data ss:Type="{type}">{value}</ss:Data>',
'</ss:Cell>'
)
-});
+});
View
14 excelFormatter/Workbook.js
@@ -148,12 +148,12 @@ Ext.define("Ext.ux.exporter.excelFormatter.Workbook", {
'<o:DocumentProperties>',
'<o:Title>{title}</o:Title>',
'</o:DocumentProperties>',
- '<ss:ExcelWorkbook>',
- '<ss:WindowHeight>{windowHeight}</ss:WindowHeight>',
- '<ss:WindowWidth>{windowWidth}</ss:WindowWidth>',
- '<ss:ProtectStructure>{protectStructure}</ss:ProtectStructure>',
- '<ss:ProtectWindows>{protectWindows}</ss:ProtectWindows>',
- '</ss:ExcelWorkbook>',
+ '<x:ExcelWorkbook>',
+ '<x:WindowHeight>{windowHeight}</x:WindowHeight>',
+ '<x:WindowWidth>{windowWidth}</x:WindowWidth>',
+ '<x:ProtectStructure>{protectStructure}</x:ProtectStructure>',
+ '<x:ProtectWindows>{protectWindows}</x:ProtectWindows>',
+ '</x:ExcelWorkbook>',
'<ss:Styles>',
'{joinedCompiledStyles}',
'</ss:Styles>',
@@ -322,4 +322,4 @@ Ext.define("Ext.ux.exporter.excelFormatter.Workbook", {
]
});
}
-});
+});
Something went wrong with that request. Please try again.