Click here to Skip to main content
15,887,175 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Revisionism in journalism Pin
BobbyStrain5-Dec-23 17:47
BobbyStrain5-Dec-23 17:47 
GeneralRe: Revisionism in journalism Pin
dandy726-Dec-23 5:14
dandy726-Dec-23 5:14 
GeneralRe: Revisionism in journalism Pin
Kornfeld Eliyahu Peter5-Dec-23 18:28
professionalKornfeld Eliyahu Peter5-Dec-23 18:28 
GeneralRe: Revisionism in journalism Pin
Daniel Pfeffer5-Dec-23 21:05
professionalDaniel Pfeffer5-Dec-23 21:05 
GeneralRe: Revisionism in journalism Pin
dandy726-Dec-23 3:30
dandy726-Dec-23 3:30 
GeneralRe: Revisionism in journalism Pin
inariy13-Dec-23 3:45
inariy13-Dec-23 3:45 
GeneralRe: Revisionism in journalism Pin
dandy7213-Dec-23 4:36
dandy7213-Dec-23 4:36 
RantClosedXML odd behavior Pin
kmoorevs5-Dec-23 8:31
kmoorevs5-Dec-23 8:31 
Firstly, I am not asking for help on a programming issue here. I'm mostly just trying to see if anyone else here is or has in the past been experiencing any problems using the ClosedXML .Net library to open/read Excel files.

I have a simple process that has worked every day flawlessly for over 2 years, then out of the blue, started failing. Confused | :confused: Basically, ClosedXML was choking trying to open an Excel (*.xlsx) file. By choking, I mean it was an IO exception reporting that the file was corrupted. The weird thing is, I can copy that file to my desktop, open it in Excel, save it, copy it back to the server, and it works fine. WTF | :WTF:

I am aware that a new version of OpenXML was released (right around the time that my process began failing???) with quite a few breaking changes. Coincidence?...I don't know yet.

What's new in the Open XML SDK | Microsoft Learn[^]

What I've tried:
0: Go to GitHub and get the latest ClosedXML libs. So this required a .net framework upgrade to 4.6+. No problem...compiles, go to open a spreadsheet and it complains about the XMLDocument version...go to GitHub, get that version and try again. It compiles fine, go to open a spreadsheet and now it whines about a netstandard library that it can't find. (sure this is an indication of inccompatibility) I tried different versions/combinations but the only way to get it working again was by reverting back to the original framework and original libraries. Back to square one. D'Oh! | :doh:

1: Plead with the new IT guy responsible for scheduling that job to please change the format to CSV! Laugh | :laugh: (the previous IT guy was on a power trip and refused to change it despite numerous requests)

2: Investigating the idea of simply extracting the sheet1.xml file from the archive and parsing it out. Then I wonder why if it was that easy, why there are so few solutions that mention this approach. It's possible that I'm looking at an extremely simple/limited structure (no formulas/formatting/etc.) in this particular file, but it looks feasible. In the event that #1 fails, this will probably be the next path of attack.

3: Install Excel on the customer's server. Ya know, they did give me an admin account so in theory, I can install anything required to get the job done. Also, I have an old Office 2007 disk around here that should still work even if it never gets registered. If 1 and 2 fail, this may be the only option. Not only is it the worst option, but it's also the slowest option. I'd like to avoid this one. Dead | X|
"Go forth into the source" - Neal Morse
"Hope is contagious"

JokeRe: ClosedXML odd behavior Pin
Nelek5-Dec-23 8:33
protectorNelek5-Dec-23 8:33 
GeneralRe: ClosedXML odd behavior Pin
Andre Oosthuizen5-Dec-23 9:03
mveAndre Oosthuizen5-Dec-23 9:03 
GeneralRe: ClosedXML odd behavior Pin
Richard MacCutchan5-Dec-23 9:34
mveRichard MacCutchan5-Dec-23 9:34 
GeneralRe: ClosedXML odd behavior Pin
yacCarsten5-Dec-23 10:18
yacCarsten5-Dec-23 10:18 
GeneralRe: ClosedXML odd behavior Pin
PIEBALDconsult5-Dec-23 17:22
mvePIEBALDconsult5-Dec-23 17:22 
GeneralRe: ClosedXML odd behavior Pin
PIEBALDconsult5-Dec-23 17:21
mvePIEBALDconsult5-Dec-23 17:21 
GeneralRe: ClosedXML odd behavior Pin
Richard MacCutchan5-Dec-23 22:02
mveRichard MacCutchan5-Dec-23 22:02 
GeneralRe: ClosedXML odd behavior Pin
PIEBALDconsult6-Dec-23 4:13
mvePIEBALDconsult6-Dec-23 4:13 
GeneralRe: ClosedXML odd behavior Pin
Richard MacCutchan6-Dec-23 5:23
mveRichard MacCutchan6-Dec-23 5:23 
GeneralRe: ClosedXML odd behavior Pin
PIEBALDconsult6-Dec-23 5:36
mvePIEBALDconsult6-Dec-23 5:36 
GeneralRe: ClosedXML odd behavior Pin
Richard MacCutchan6-Dec-23 5:48
mveRichard MacCutchan6-Dec-23 5:48 
GeneralRe: ClosedXML odd behavior Pin
PIEBALDconsult6-Dec-23 6:13
mvePIEBALDconsult6-Dec-23 6:13 
GeneralRe: ClosedXML odd behavior Pin
Richard MacCutchan6-Dec-23 6:18
mveRichard MacCutchan6-Dec-23 6:18 
GeneralRe: ClosedXML odd behavior Pin
PIEBALDconsult6-Dec-23 6:44
mvePIEBALDconsult6-Dec-23 6:44 
GeneralRe: ClosedXML odd behavior Pin
Richard MacCutchan6-Dec-23 6:49
mveRichard MacCutchan6-Dec-23 6:49 
GeneralRe: ClosedXML odd behavior Pin
PIEBALDconsult6-Dec-23 7:22
mvePIEBALDconsult6-Dec-23 7:22 
GeneralRe: ClosedXML odd behavior Pin
Richard MacCutchan6-Dec-23 23:10
mveRichard MacCutchan6-Dec-23 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.