zdavatz / spreadsheet

The Ruby Spreadsheet by ywesee GmbH
http://spreadsheet.ch
GNU General Public License v3.0
1.13k stars 240 forks source link

Microsoft Office : Protected View #237

Closed AhmedKamal20 closed 5 years ago

AhmedKamal20 commented 5 years ago

Recently i used the spreadsheet gem to generate a report on my rails app But, when i open the result file with Microsoft Office, i get this warning :

"Office has detected a problem with this file. Editing it may harm your computer. Click for more details."

According to this support article from Microsoft

File validation failure - When you see a message in Protected View that says "Office has detected a problem with this file. Editing it may harm your computer. Click for more details.", the file didn’t pass file validation. File validation scans file for security problems that can result from changes in the file structure.

So, Does anyone know how to solve this ?

Thank you,

zdavatz commented 5 years ago

which Version of office, which OS (& Version) are you using?

AhmedKamal20 commented 5 years ago

Sorry for not including that in the post.

Server :

Client :

zdavatz commented 5 years ago

Well Office for Mac does have some issues. Try opening your generated file with LibreOffice.

AhmedKamal20 commented 5 years ago

It works without Issues on LibreOffice on Linux, but most of my users use Office on Windows.

Anyway, Thank you.

And if any one know how to solve this in the future, please mention me.