Post

3 followers Follow
0
Avatar

Error messages opening .xlsx or .docx

We have created a web page in our corporate intranet for business users to submit project requests. Our developer uses the Clarizen API to create the project in Clarizen and upload any attachments. In Clarizen, when we access the submitted project and click on the attachments, we get error messages for both .docx and .xlsx. We don't get the messages if the attachments are .doc or .xls. Is there special coding that we need to do to better handle .docx and .xlsx?

For an.xlsx, the first message we get is 'we found a problem with some content in 'filename'.  Do you want to try to recover as much as we can?   We click on Yes.  The second message is Excel was able to open the file by repairing or removing the unreadable content. 

Suzanne Fielden Answered

Official comment

Avatar

Hi Suzanne,

Clarizen doesn't change the content of the Excel file you upload.

Those messages are coming from Excel itself and related to the content of the Excel file. Did you try opening those Excel files locally?  

Hope this helps,

Ophir

Ophir Kenig
Comment actions Permalink

Please sign in to leave a comment.

12 comments

0
Avatar

If I attach the .xlsx or .docx from within Clarizen, they will open fine.  

Suzanne Fielden 0 votes
Comment actions Permalink
0
Avatar

Hi Suzanne,

I'd like our support team to examine this.

Please open a support ticket for this issue, and attach a sample Excel file which shows those messages when downloaded from Clarizen. 
We'd also like to know if the same issue occurs when uploading the Excel file directly through the Clarizen UI, or only when the file is uploaded through the API. 

Thanks,

Ophir

Ophir Kenig 0 votes
Comment actions Permalink
0
Avatar

I opened a case yesterday and Danielle Lasirona said I should post something on the developer forum.  The request number is 24266.  I attached screen prints of the error messages.  

Suzanne Fielden 0 votes
Comment actions Permalink
0
Avatar

Hi Suzanne, 

Sorry for that mess. I can see your support ticket. We could really use a sample EXCEL and/or WORD file that actually causes those issues, so we can reproduce it here.

Please attach it to the support ticket and we'll proceed.

 

Thanks,

Ophir

Ophir Kenig 0 votes
Comment actions Permalink
0
Avatar

Hi Suzanne,

I ran my tests to load the samples files your provided to my Clarizen account via the API and found no issues.

Can you provide a code snippet of the part in your application that does the uploading?

Thanks,

Ophir 

Ophir Kenig 0 votes
Comment actions Permalink
0
Avatar

Also would be helpful if you can provide the version of the file which does not open in word (The files in the ticket seem to open fine in word)

Eyal Post 0 votes
Comment actions Permalink
0
Avatar

I will attach the code shortly.   Can you add these comments to the case so I can respond to the case and not both the forum and the case?  I'm assuming you were able to open the documents without errors (ones noted in the png in the case) from within Clarizen after loading them via the API?

I have attached the files to the case that generate the error when I try opening them. 

Suzanne Fielden 0 votes
Comment actions Permalink
0
Avatar

comment added to the case, we'll continue the thread there.

Eyal Post 0 votes
Comment actions Permalink
0
Avatar

Hi Suzanne,

I found issues in your code, particularly in the part the reads the file contents.

First, the byte array you defined should be exactly the same size as the file contents (yours is 1 byte larger - Dim x(20) in VB defines an array of 21 elements).

Second, Stream.Read may not return the full contents of the stream. You need to check the no. of bytes returned and possibly issues more Read calls until the whole content is read.

Please check my suggestions, and verify the content sent to Clarizen is exactly the same as the file contents.

Hope this helps,

Ophir

Ophir Kenig 0 votes
Comment actions Permalink