Unable to load the Excel (xlsx) in in document server

Any issues about docs (uploading, editing and etc.)
Post Reply
lmenaria
Posts: 32
Joined: Thu Jun 16, 2016 10:57 am
Contact:

Unable to load the Excel (xlsx) in in document server

Post by lmenaria » Thu Jul 28, 2016 2:04 pm

Hi,

I have uploaded excel file using Community Server API method, but when I tried to open using document server doc editor with advanced options, it shows "Faild to load" the document.
Editor shows Process and after few moments it shows "Choose CSV options" and after OK it shows load error.

Please let me know is it possible to view the file which is uploaded to Community server to Doc server?

Thanks,
Laxmi Lal Menaria

lmenaria
Posts: 32
Joined: Thu Jun 16, 2016 10:57 am
Contact:

Load failed

Post by lmenaria » Mon Aug 01, 2016 7:09 am

Hi,

I have uploaded excel file to community server, uploaded successfully. But when I tried to open with document viewer with below configuration, it prompts me for "CSV Format option" and load failed error.

Code: Select all

<script id="scriptApi" type="text/javascript" src="http://documentserver.com/OfficeWeb/apps/api/documents/api.js"></script>

<script type="text/javascript" language="javascript">
    var docEditor;
    docEditor = new DocsAPI.DocEditor("documentEditor",
    {
        "documentType": "spreadsheet",
        "height": "100%",
        "type": "desktop",
        "width": "100%",
        "document": {
            "fileType": "xlsx",
            "key": "@Guid.NewGuid().ToString().Replace("-", "").Substring(1, 20)",
            "title": "LL.xlsx",
            "url": "[b]http://commserver.com/products/files/doceditor.aspx?fileid=71[/b]",
            "permissions": {
                "download": true,
                "edit": false,
                "print": true,
                "review": false,
            },
        },
        "editorConfig": {
            "lang": "en-US",
            "mode": "view",
            "customization": {
                "about": false,
                "chat": false,
                "comments": false,
                "feedback": {
                    "url": "@AppBaseURLWithSlash",
                    "visible": false,
                },
                "goback": {
                    "text": ".",
                    "url": "@Request.Url",
                },
                "logo": {
                    "image": "@AppBaseURL/content/img/logo.png",
                    "imageEmbedded": "@AppBaseURL/content/img/logo.png",
                    "url": "@AppBaseURLWithSlash",
                },
            },
            },
        "events": {
            "onCollaborativeChanges": onCollaborativeChanges,
            "onDocumentStateChange": onDocumentStateChange,
            "onDownloadAs": onDownloadAs,
            "onError": onError,
            "onReady": onReady,
            "onRequestEditRights": onRequestEditRights,
            "onRequestHistory": onRequestHistory,
            "onRequestHistoryData": onRequestHistoryData,
            "onRequestHistoryClose": onRequestHistoryClose,
        },
    });   
</script>
Please let me know what I am doing wrong with this config?

Thanks,
Laxmi Lal Menaria

Dean
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: Unable to load the Excel (xlsx) in in document server

Post by Dean » Thu Aug 04, 2016 11:20 am

Hello,

What are the options you choose at the window of Option selection?
Are all other files opened correctly?
What is the method you use to upload?
Can you create a file manually?

lmenaria
Posts: 32
Joined: Thu Jun 16, 2016 10:57 am
Contact:

Re: Unable to load the Excel (xlsx) in in document server

Post by lmenaria » Thu Aug 04, 2016 1:18 pm

I am using this method to upload the file.
https://api.onlyoffice.com/portals/meth ... 0my/upload

I am able to see file with the portal itself and able to open.

Eugenie
Posts: 134
Joined: Mon Aug 25, 2014 10:11 am

Re: Unable to load the Excel (xlsx) in in document server

Post by Eugenie » Mon Aug 08, 2016 12:56 pm

Please reply to all questions as we can detect the issue.

We are waiting for your reply!

lmenaria
Posts: 32
Joined: Thu Jun 16, 2016 10:57 am
Contact:

Re: Unable to load the Excel (xlsx) in in document server

Post by lmenaria » Wed Aug 10, 2016 6:35 am

Please see my response inline:

What are the options you choose at the window of Option selection?
- It shows "Choose CSV options", with some encoding items, I have just used default i think It was ascii,

Are all other files opened correctly?
- Yes. if I tried the files using public urls working fine.

What is the method you use to upload?
- I have used the API method to upload the file
https://api.onlyoffice.com/portals/meth ... 0my/upload

Can you create a file manually?
- Yes, I have created file manually and existing files I can browse from dashboard itself.

lmenaria
Posts: 32
Joined: Thu Jun 16, 2016 10:57 am
Contact:

"Unknown error" while opening the excel by document server

Post by lmenaria » Wed Aug 10, 2016 6:48 am

Hi,

I would like to display excel (xlsx) file using document server within the browser. I have tried the configuration which is listed here viewtopic.php?f=3&t=7560#p10506

When I tried the file which is hosted at website root it is working fine
i.e. http://www.example.com/myexcelfiles/excel1.xlsx

but when I serve dynamically using ASP.net MVC page it shows "Unknown Error". Please let me know what I am doing wrong.
url is http://www.example.com/mypage/downloadfile?name=LL.xlsx

My code base in this

Code: Select all

public ActionResult downloadfile(string fileName)
{
  var basePath = @"c:\temp\";
  var allBytes = File.ReadAllBytes(basePath + fileName);
  return File(allBytes, "application/vnd.ms-excel", fileName);
}
I think code part is okay, when I tried the url " http://www.example.com/mypage/downloadfile?name=LL.xlsx" directly in browser, I am able to see the file downlaods is okay. no corrupt.

lmenaria
Posts: 32
Joined: Thu Jun 16, 2016 10:57 am
Contact:

Re: "Unknown error" while opening the excel by document serv

Post by lmenaria » Sat Aug 13, 2016 4:35 am

Hi Guys,

Can anyone help?

Eugenie
Posts: 134
Joined: Mon Aug 25, 2014 10:11 am

Re: Unable to load the Excel (xlsx) in in document server

Post by Eugenie » Mon Aug 22, 2016 12:12 pm

Hello,

Try to use the link you indicated
"url": "http://commserver.com/products/files/do ... ?fileid=71"
in your browser to check if you can download your document from it.

Post Reply