Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
3d3a5d58
Commit
3d3a5d58
authored
Aug 18, 2017
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error in spreadsheet in case of null Editor.xlsx url
parent
226b04a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
cell/api.js
cell/api.js
+17
-10
No files found.
cell/api.js
View file @
3d3a5d58
...
...
@@ -975,19 +975,18 @@ var editor;
return
new
Promise
(
function
(
resolve
,
reject
)
{
var
openXml
=
AscCommon
.
openXml
;
//open cache xlsx instead of documentUrl, to support pivot in xls, ods... and don't send jwt signature
if
(
t
.
isChartEditor
&&
url
)
{
if
(
t
.
isChartEditor
)
{
resolve
();
return
;
}
var
processData
=
function
(
err
,
data
)
{
if
(
err
)
{
reject
(
err
);
// or handle err
}
else
{
var
nextPromise
;
if
(
!
err
&&
data
)
{
openXml
.
SaxParserDataTransfer
.
wb
=
wb
;
var
doc
=
new
openXml
.
OpenXmlPackage
();
var
wbPart
=
null
;
var
wbXml
=
null
;
var
loadAsyncFil
e
=
require
(
'
jszip
'
).
loadAsync
(
data
).
then
(
function
(
zip
)
{
nextPromis
e
=
require
(
'
jszip
'
).
loadAsync
(
data
).
then
(
function
(
zip
)
{
return
doc
.
openFromZip
(
zip
);
}).
then
(
function
()
{
wbPart
=
doc
.
getPartByRelationshipType
(
openXml
.
relationshipTypes
.
workbook
);
...
...
@@ -1064,12 +1063,20 @@ var editor;
if
(
window
.
console
&&
window
.
console
.
log
)
{
window
.
console
.
log
(
err
);
}
}).
then
(
function
(
err
)
{
//clean up
openXml
.
SaxParserDataTransfer
=
{};
return
Asc
.
ReadDefTableStyles
(
wb
);
}).
then
(
resolve
,
reject
);
});
}
else
{
if
(
err
)
{
if
(
window
.
console
&&
window
.
console
.
log
)
{
window
.
console
.
log
(
err
);
}
}
nextPromise
=
Promise
.
resolve
();
}
nextPromise
.
then
(
function
(
err
)
{
//clean up
openXml
.
SaxParserDataTransfer
=
{};
return
Asc
.
ReadDefTableStyles
(
wb
);
}).
then
(
resolve
,
reject
);
};
if
(
typeof
url
===
"
string
"
)
{
require
(
'
jsziputils
'
).
getBinaryContent
(
url
,
processData
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment