Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-06 Thread Rich Shepard

On Sat, 4 May 2024, King Beowulf wrote:


From one of the many Libreofice help forums (edited for details and clarity):
To save-as xlsx to ods, and the "retype" password box pops up with "Hash 
incompatible" message:


Ed,

I don't have python pandas installed on this host so I tried the method you
found.

It turns out that while that protected box popped up, the spreadsheet was
saved as an .ods file. (I hadn't looked so I hadn't see that.) Loading the
.ods version and right-clicking on each tab's sheet name lock symbol allowed
me to remove protections.

All's good now.

Thanks very much,

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

On Sat, 4 May 2024, Ted Mittelstaedt wrote:


You don't even have to do that - just to illustrate the stupidity of the
Microsoft Excel password protection on a spreadsheet, I loaded up the
spreadsheet in Excel then opened another copy of Excel, created 11 blank
pages in a new workbook, then did a Cntl-A on each page of the source
workbook and went to the other copy and did a Cntl-V on each page of the
destination workbook.

As far as I can tell everything copied over fine. Then I did a file save
as ODS and emailed it to Rich.


Ted,

Thank you. I have no M$ software since I defenestrated in 1997.

Regards,

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

On Sat, 4 May 2024, Eldo Varghese wrote:


I had to break out the hexeditor and remove the protections, not sure if
it worked.
Here is the ods file [0]


Eldo,

Thank you very much.

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Eldo Varghese
Hey
I had to break out the hexeditor and remove the protections, not sure if 
it worked.
Here is the ods file [0]
-Eldo
[0] https://filesupload.co/f49deea1aeea960c/WillHgAllocations.ods

On 5/4/24 10:03, Rich Shepard wrote:
> On Sat, 4 May 2024, Eldo Varghese wrote:
> 
>> The only xlsx file I see on there is the 303dlist [0] which does not seem
>> to be password protected according to my LO sheets application. Anyway
>> here it is converted to ODS [1]
> 
> Eldo, Ted, etc:
> 
> My mistake. Go to this page
>  and
> download the file: Technical Documents -> Oct. 7, 2019 DEQ allocation
> spreadsheet.
> 
> Thanks for pointing out my error,
> 
> Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

On Sat, 4 May 2024, King Beowulf wrote:


From one of the many Libreofice help forums (edited for details and clarity):


Ed,

I hadn't yet gone to LO to see if there was a solution.

To save-as xlsx to ods, and the "retype" password box pops up with "Hash 
incompatible" message:


Open Excel spreadsheet in Calc, Then File -> Save As to save as a new ods 
file. When the "retype" window pops up, for each protected sheet do:


click on “retype”
clear “New password must match the original password” checkbox
type anything, e.g., “a” as both password and confirm
(Note: remove password from from this protected item does not work)

The ods is now saved with new sheet password ("a" in above example).  Now, in 
the newly saved and open ods file, for each protected sheet (padlock next to 
sheet name), right-click and choose “protect”, enter the password (“a” in the 
above example).  Your sheets are now not protected and you can carry on as 
normal.


Now I don't need to. :-)

Many thanks,

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread King Beowulf
On 5/4/24 08:26, Rich Shepard wrote:
> A state agency provides a Microsoft .xlsx spreadsheet on a web site page.
> It's available to the public. When I tried to save it as a LO Calc
> spreadsheet (.ods) it told me it was password protected; a dialog box asks
> me to re-enter my (non-existent) password. It also will not allow me to
> export it as an .xls file.
>
> This is the first password-protected spreadsheet I've encountered. I don't
> understand why it's protected but the data should be in a database, not a
> spreadsheet, but this is another very common example of "if the only tool
> you have is Excel, everything looks like a spreadsheet."
>
> Any ideas on how to proceed?
>


 From one of the many Libreofice help forums (edited for details and 
clarity):

To save-as xlsx to ods, and the "retype" password box pops up with "Hash 
incompatible" message:

Open Excel spreadsheet in Calc, Then File -> Save As to save as a new 
ods file. When the "retype" window pops up, for each protected sheet do:

click on “retype”
clear “New password must match the original password” checkbox
type anything, e.g., “a” as both password and confirm
(Note: remove password from from this protected item does not work)

The ods is now saved with new sheet password ("a" in above example).  
Now, in the newly saved and open ods file, for each protected sheet 
(padlock next to sheet name), right-click and choose “protect”, enter 
the password (“a” in the above example).  Your sheets are now not 
protected and you can carry on as normal.

Rich, if you need, I can upload the ods file somewhere for you to download.

-Ed




Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

On Sat, 4 May 2024, Michael Ewan wrote:


Opening it in LO Calc shows each sheet is protected.  The author would need
to change that.
Or use this Python script.

#!/usr/bin/env python

import sys
import pandas as pd

sheet = sys.argv[2]
df = pd.read_excel(sys.argv[1], sheet_name=sheet)
df.to_csv(sheet+'.csv')  # or df.to_excel()


Thanks, Michael.

Monday I'll ask the project manager to remove the protection.

Regards,

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

On Sat, 4 May 2024, Ted Mittelstaedt wrote:


Hmm looks like the list does not permit attachments?


Ted,

Correct.

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

On Sat, 4 May 2024, Eldo Varghese wrote:


The only xlsx file I see on there is the 303dlist [0] which does not seem
to be password protected according to my LO sheets application. Anyway
here it is converted to ODS [1]


Eldo, Ted, etc:

My mistake. Go to this page
 and
download the file: Technical Documents -> Oct. 7, 2019 DEQ allocation
spreadsheet.

Thanks for pointing out my error,

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Eldo Varghese
The only xlsx file I see on there is the 303dlist [0] which does not 
seem to be password protected according to my LO sheets application.
Anyway here it is converted to ODS [1]

-Eldo

[0] https://www.oregon.gov/deq/wq/Documents/wqa1820303dlistP.xlsx
[1] https://fastupload.io/5n09

On 5/4/24 09:36, Rich Shepard wrote:
> On Sat, 4 May 2024, Ted Mittelstaedt wrote:
> 
>> Open it in excel and do a file save as an OpenDoc spreadsheet.  (*.ods)
> 
> Ted,
> 
> That's what I've tried to do.
> 
>> If this is a publicly accessible spreadsheet with no private data in it
>> just email me the URL and I'll send it back.
> 
> Okay.
> 
> 
> 
> Thanks,
> 
> Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Ted Mittelstaedt
I emailed it to you directly.  Let me know if it came through.

According to Excel there was no password on it.   I have noticed lately that
with Excel (I think this started after a patch was pushed out by Microsoft
and it affects versions of Excel as far back as 2016) that by default all
documents are set to "editing disabled"   Excel puts a button on the top you
can click that enables editing and once you click that you can do a save-as
on a document and make changes.

It's not just setting the read-only flag on the file and I think there are
other rules involved such as Excel looking at the "owner" name of the
document (where Excel gets that name from I am not sure) and if the person
opening the document has a different "owner name" then it makes the document
editing disabled.

Obviously, Libre Office doesn't know exactly how to deal with this structure
in the Excel file and so it's claiming it's password-protected when in
reality the document is NOT password protected.

I would encourage you to file a bug on this.  Since the spreadsheet is
publicly accessible and you can duplicate the bug with LO, it should be easy
enough for the LO developers to duplicate

Ted

-Original Message-
From: PLUG  On Behalf Of Ted Mittelstaedt
Sent: Saturday, May 4, 2024 9:45 AM
To: 'Portland Linux/Unix Group' 
Subject: Re: [PLUG] Password protected .xlsx; cannot save as .ods

Hmm looks like the list does not permit attachments?

Ted

-Original Message-
From: PLUG  On Behalf Of Ted Mittelstaedt
Sent: Saturday, May 4, 2024 9:44 AM
To: 'Portland Linux/Unix Group' 
Subject: Re: [PLUG] Password protected .xlsx; cannot save as .ods

Is this what you are after?

Ted

-Original Message-
From: PLUG  On Behalf Of Rich Shepard
Sent: Saturday, May 4, 2024 9:36 AM
To: plug@lists.pdxlinux.org
Subject: Re: [PLUG] Password protected .xlsx; cannot save as .ods

On Sat, 4 May 2024, Ted Mittelstaedt wrote:

> Open it in excel and do a file save as an OpenDoc spreadsheet.  
> (*.ods)

Ted,

That's what I've tried to do.

> If this is a publicly accessible spreadsheet with no private data in 
> it just email me the URL and I'll send it back.

Okay.

<https://www.oregon.gov/deq/wq/tmdls/Pages/default.aspx>

Thanks,

Rich




Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Ted Mittelstaedt
Hmm looks like the list does not permit attachments?

Ted

-Original Message-
From: PLUG  On Behalf Of Ted Mittelstaedt
Sent: Saturday, May 4, 2024 9:44 AM
To: 'Portland Linux/Unix Group' 
Subject: Re: [PLUG] Password protected .xlsx; cannot save as .ods

Is this what you are after?

Ted

-Original Message-
From: PLUG  On Behalf Of Rich Shepard
Sent: Saturday, May 4, 2024 9:36 AM
To: plug@lists.pdxlinux.org
Subject: Re: [PLUG] Password protected .xlsx; cannot save as .ods

On Sat, 4 May 2024, Ted Mittelstaedt wrote:

> Open it in excel and do a file save as an OpenDoc spreadsheet.  
> (*.ods)

Ted,

That's what I've tried to do.

> If this is a publicly accessible spreadsheet with no private data in 
> it just email me the URL and I'll send it back.

Okay.

<https://www.oregon.gov/deq/wq/tmdls/Pages/default.aspx>

Thanks,

Rich



Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Ted Mittelstaedt
Is this what you are after?

Ted

-Original Message-
From: PLUG  On Behalf Of Rich Shepard
Sent: Saturday, May 4, 2024 9:36 AM
To: plug@lists.pdxlinux.org
Subject: Re: [PLUG] Password protected .xlsx; cannot save as .ods

On Sat, 4 May 2024, Ted Mittelstaedt wrote:

> Open it in excel and do a file save as an OpenDoc spreadsheet.  
> (*.ods)

Ted,

That's what I've tried to do.

> If this is a publicly accessible spreadsheet with no private data in 
> it just email me the URL and I'll send it back.

Okay.

<https://www.oregon.gov/deq/wq/tmdls/Pages/default.aspx>

Thanks,

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Ted Mittelstaedt
Which entry there's a lot of links on that page

Ted

-Original Message-
From: PLUG  On Behalf Of Rich Shepard
Sent: Saturday, May 4, 2024 9:36 AM
To: plug@lists.pdxlinux.org
Subject: Re: [PLUG] Password protected .xlsx; cannot save as .ods

On Sat, 4 May 2024, Ted Mittelstaedt wrote:

> Open it in excel and do a file save as an OpenDoc spreadsheet.  
> (*.ods)

Ted,

That's what I've tried to do.

> If this is a publicly accessible spreadsheet with no private data in 
> it just email me the URL and I'll send it back.

Okay.

<https://www.oregon.gov/deq/wq/tmdls/Pages/default.aspx>

Thanks,

Rich



Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

On Sat, 4 May 2024, Michael Ewan wrote:


I have come across this before but it was a DRM (or as M$ calls it IRM)
problem. It basically makes the document read only, you cannot save it or
even save as. You might try opening it directly with LO Calc, or write a
Python script to open the file with Pandas read_excel(), as I was forced
to do for the very same reasons you have, the data should be in a
database.


Michael,

If I don't have a translation by Ted I'll write to the manager who sent the
link and ask him to remove the password(s).

Thanks,

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

On Sat, 4 May 2024, Ted Mittelstaedt wrote:


Open it in excel and do a file save as an OpenDoc spreadsheet.  (*.ods)


Ted,

That's what I've tried to do.


If this is a publicly accessible spreadsheet with no private data in it
just email me the URL and I'll send it back.


Okay.



Thanks,

Rich


Re: [PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Ted Mittelstaedt
Open it in excel and do a file save as an OpenDoc spreadsheet.  (*.ods)

If this is a publicly accessible spreadsheet with no private data in it just
email me the URL and I'll send it back.

There might also be online xls to ods converters as well

Ted

-Original Message-
From: PLUG  On Behalf Of Rich Shepard
Sent: Saturday, May 4, 2024 8:26 AM
To: plug@lists.pdxlinux.org
Subject: [PLUG] Password protected .xlsx; cannot save as .ods

A state agency provides a Microsoft .xlsx spreadsheet on a web site page.
It's available to the public. When I tried to save it as a LO Calc
spreadsheet (.ods) it told me it was password protected; a dialog box asks
me to re-enter my (non-existent) password. It also will not allow me to
export it as an .xls file.

This is the first password-protected spreadsheet I've encountered. I don't
understand why it's protected but the data should be in a database, not a
spreadsheet, but this is another very common example of "if the only tool
you have is Excel, everything looks like a spreadsheet."

Any ideas on how to proceed?

TIA,

Rich





[PLUG] Password protected .xlsx; cannot save as .ods

2024-05-04 Thread Rich Shepard

A state agency provides a Microsoft .xlsx spreadsheet on a web site page.
It's available to the public. When I tried to save it as a LO Calc
spreadsheet (.ods) it told me it was password protected; a dialog box asks
me to re-enter my (non-existent) password. It also will not allow me to
export it as an .xls file.

This is the first password-protected spreadsheet I've encountered. I don't
understand why it's protected but the data should be in a database, not a
spreadsheet, but this is another very common example of "if the only tool
you have is Excel, everything looks like a spreadsheet."

Any ideas on how to proceed?

TIA,

Rich