Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Jan 07, 2021 12:04 pm

I'm having issues loading password-protected documents. Even when providing the correct password for the document I'm getting an "Invalid Data" exception. The issue is happening with .docx files created using Office 2019. Below is the test method code to replicate the issue and I have attached the Word document to recreate the issue, but any password-protected document seems to have the same effect. This test code is running using Office Platinum with hotfix 5.12.8. I am also experiencing a similar issue with an XLSX test - Have Microsoft changed their encryption perhaps?

Code: Select all
[TestMethod]
        public void RemoveWordSecurityTest()
        {
            string strFileName = @".\Password Protected Word.docx";
            string strTarget = @".\Password Protected Word Unlocked.docx";
            string strPassword = "password";
            bool blResult;

            try
            {
                Document document = new Document(strFileName, strPassword);

                document.RemoveEncryption();
                document.SaveToFile(strTarget);
                document.Dispose();
                blResult = true;
            }
            catch (Exception e)
            {
                blResult = false;
                Assert.Fail($"Failed with Exception:\n{e.Message}\n{e.StackTrace}");
            }

            Assert.IsTrue(blResult, "Security Removal Failed");
        }


Let me know if you need anything further to help resolve this issue.

Darren

wraydc
 
Posts: 130
Joined: Wed Apr 11, 2018 5:14 am

Fri Jan 08, 2021 5:53 am

Hello,

Thanks for your inquiry.
I tested your scenario and indeed reproduced your issue. I have logged it in our bug tracking system with the ticket SPIREDOC-5431. If there is any update, we will let you know. Apologize for the inconvenience caused.
Besides, regarding the XLSX file, I created a simple encrypted XLSX file with Microsoft Office 2019 and then tested it, but did not encounter any issue. Could you please provide your test file to help us investigate further? Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Mon Jan 18, 2021 12:31 pm

Just a quick check - Any progress or ETA for this issue?

wraydc
 
Posts: 130
Joined: Wed Apr 11, 2018 5:14 am

Tue Jan 19, 2021 6:17 am

Hello,

Thanks for your follow up.

I just checked the status of your issue but found that it has not been resolved. I have urged our Dev team and have given your issue the highest priority.
Anyway, we will notify you as soon as there is any update. Apologize for the inconvenience caused.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Tue Jan 26, 2021 6:05 am

Hello,

Glad to inform you that our Dev team has fixed the issue of ticket SPIREDOC-5431. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Tue Feb 09, 2021 10:09 am

Hello,

Greetings from E-iceblue!
Glad to inform you that we just released Spire.Office Platinum(Hotfix) Version:6.2.1 which fixes your issue, please download it from the following links to test on your side. Looking forward to your testing result.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.Office/6.2.1

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Mon Feb 22, 2021 1:47 am

Hello,

Greetings from E-iceblue.
How is your issue now? Does this hotfix solve your issue? Could you please give us some feedback at your convenience?

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.Doc