Saving .doc files with MS Word through WebDAV not possible - no PUT request sent - node.js

I'm trying to implement a Node.js file server using the webdav-server npm module which works perfectly.
I'm able to open, edit and save .docx files with Microsoft Word (Microsoft® Word 2016 MSO (16.0.14228.20216) 32-Bit). As well as .odt files with LibreOffice Writer (Version: 7.0.6.2 (x64))
Capturing the requests made by Microsoft Word or LibreOffice Writer I detect the expected order GET - LOCK - PUT - UNLOCK representing the requests made by opening a file (GET), deactivating the readonly mode (LOCK), saving some changes (PUT) and closing the text editor application (UNLOCK).
However if I want to edit and save a .doc file with my Mircosoft Word application I see that there is not PUT request when saving the changes and therefore the changes are lost on closing the application. There is no feedback of any kind through MS Word when clicking the save button. Not that it saved the changes nor that it didn't.
On the other hand when I open the .doc files with LibreOffice Writer there is a PUT request as I'd expected it to be.
I also tried to switch the file type in the MS Word settings so it should use .doc to save files instead of .docx (default with MS Word 2016) but that didn't change anything.
Anyone knows what the problem could be? I don't get why the PUT request should not be sent by Microsoft Word for the .doc file type but for the .docx file type?
(It's a requirement of the project that it also works with .doc files, in the best case with LibreOffice and MS Word)
Thank you all in advance!

Related

Find file saved from windows live mail

I use windows live mail. Sometimes I get attachments in
Word, Excel, etc. If I open the document from mail, and hit "save" I can not
find out where it saves. It does not save in any temp file that I can see.
Can anyone please tell me if i can ever get those saved files ?
Please note that this happens when i hit only save.
For Excel File, Open attachment again in Excel from Windows Live Mail.Then I found file location here :
File>Info>Related Documents>Open File Location.
In my case it was on "C:\Users\\AppData\Local\Microsoft\Windows\INetCache\IE\A605094L"
By default this file location will be hidden so you can not find it directly.

Where is a file type info in excel file structure?

In our application in SAP we have a mail sending functionality. The problem is, its an old framework and it takes only 3 characters file types for attachments. We now want to send .xlsx files. But the framework only takes first 3 characters so it works with .xls. So when a user opens an attachment he gets the following message:
Now I know one solution is to go to Trust center and hide that kind of messages. The another framework that generates the .xlsx files can only generated .xlsx. But I can enhance it.
My question is: in the excel file structure (when extracted via 7zip) is there somewhere an information about what kind of file (filetype) is the file I just extracted?
Cause if the message in the excel is shown, I can imagine that there is a check that checks filetype of a file and some information in xml files in the excel file structure.
Thanks.

How to programmatically create MS Office .doc or .docx files on a linux server

In the past I've used catdoc for reading .doc files, but now I need to write them.
What is the best way to go about this? I don't need it to be perfect or fully featured.
a quick and dirty way would be, to write your file in HTML and save the file as .doc
Because word can open HTML you would have a Word File^^
Beware that if you open the file with word sometimes the "web-view-mode" is selected

Opening xls file and enabling save mode and save it using C#

I downloaded an xls file from a website and I need to convert to csv for further parsing . I used a 3rd party library to do this, But the xls file doenst open as it. But after I open the file in excel and saving it manually, it works. I am not sure what is happening. can somebody let me know how to write a c# code to open xls in Excel and enable saving , save it and close it?. If I can do this programtically I am all set.

SWT OleClientSite: How to load XML file in Excel?

I have an Excel file in OfficeML format, MyData.xls. Since I upgraded to Office 2007 from Office 2003 I get a warning message saying that the file content does not match the file extension. It seems that OfficeML now must have the extension 'xml'.
In my application I use OleClientSite to display the file in an OleFrame object. If I change the file extension to 'xml' then Excel is not started. If I leave the extension as 'xsl' then I get the above warning message.
How can I force the file with the 'xml' extension to be opened in the OleFrame using Excel?
The easiest solution is to switch back to the 2003 format, which should not require any changes to your application. To do this, open your file with the extension set to *.xls. When prompted with the warning ("... do you want to open the file now?"), proceed to open (this is a warning to make sure you don't unintentionally open a macro-enabled file). Once in Excel and the file is open, simply save it as *.xls. This can be done by going to "Office Button / Save As / Excel 97-2003 Workbook".
Now, the harder solution will be upgrading your application to deal with the new OfficeML format. I don't know about the component you're using, but it will likely still work for some of the binary parts in the new standard (most notably VBA projects), but you're going to have to unpack and start reading XML files.
If you haven't already done this, create a new Excel workbook, save it as *.xlsx (the 2007 format) and in Explorer, change its extension to *.zip. Open it up and take a look around. For more in-depth on the files, I would start digesting this MSDN article.
Maybe I'm missing something, but shouldn't you just use .xslx as your extension? I'm assuming that by OfficeML, you're refering to Office Open XML.
The <?mso-application progid="Excel.Sheet"?> should be present in the XSL template used.
The below link explains clearly how to include the processing instruction. I had to do something similar and it worked for me.
http://www.shareyourwork.org/roller/ralphsjavablog/entry/generating_excel_sheets_with_xslt

Resources