I have a Shared Excel file stored on a NAS, and i want to insert some data from a csv into the Excel without the excel being unshared.
can i maybe share the excel file programmatically ?
I tried reading the excel with py pandas and then overwriting with the new inserted data,
but then the file isn't shared anymore, so my users that are still using the file won't notice the change and maybe they are going to save their current changes which would overwrite the inserted data,
i also tried using VBS but it didn't work because the excel is shared.
I'm looking for a solution which would allow my users to modify the file without overwriting the new inserted data.
is that possible ?
Thanks for your attention. I’m looking forward to any reply.
Related
I have several ppt files and a single excel file containing the same information. I want all ppt files to be updated automatically whenever I change the information in the excel file. The reason is that the information is changing regularly and I want to avoid that it has to be changed in all the files manually every time. Instead, it should be possible to update all the files just by changing the excel.
Do you know, how I could do this?
Thanks and regards,
Marius
I have tried to get data from a particular folder containing only .xls using power query without any luck. Right now I'm running a macro to save as .xlsx before refreshing the data, however, I'd like to reduce that step and get data without having to change the format.
Can anyone help me with the same?
Is there a way to insert a pdf file into Excel such that when I send the excel to another PC, they can still open the pdf file?
To do this I understand that I can't create a reference to the file because that file is saved on my computer but not on the other person's computer. What I need is to embed the file, correct? How can I do this without using a reference to an object, like a link? Again, what I want is this file put directly into my Excel.
Is this even possible? Would it maybe work on an excel that has sharing enabled so multiple users can access the excel at once?
If it helps, I ask because I'm creating a program that automatically creates files and needs to somehow connect them to this shared excel.
TL;DR: Excel Workbook generated by Docx4J always says corrupted but I can't determine what Excel doesn't like about the underlying XML, let alone how to fix it.
My use case is as follows:
I am trying to produce an excel workbook with charts and graphs automatically on a regular basis. Only the raw data will change but everything else will dynamically update as the raw data is changed.
So I built an excel workbook which has a number of charts and graphs being generated by a sheet of raw data. I am using it as a template. All values of the raw data are numeric. The intent was to use Docx4J to read this 'template' and to populate the raw data sheet, then save it as a new file whereupon opening will initiate the recalculation and the charts and graphs will update. Since I am new to Docx4j, I basically decided to do baby steps by first seeing if I could open and read the contents of the cells; which I could. So far so good. I also could change the values of the cells but I could only verify this programatically by writing out to the console the location and value before a change, then the location and value after the change (ex. A1=45 followed by A1=55).
My problem starts when I try to open the resulting file. It generates, looks to be about the right size but Excel claims it is corrupted. It does try to recover what it can, but ultimately fails and the workbook won't even open. For troubleshooting, I opened up the generated xlsx and confirmed all the various XML files that make up an xlsx file were present and readable so I am concluding either something is missing or some part of the XML coming out the other side is not what Excel wants. Further troubleshooting involved creating an empty workbook (no data, 1 sheet) as my 'template', opening it and then saving it back to the file system with a different name and simply trying to see if I could open it in Excel but no dice. This has me ruling out anything to do with my attempts to write or add data to the sheet.
Relevant Environment Information:
'template' workbook is being generated on a Windows 10 64bit machine
My docx4j code is executing on a Debian 10 Linux machine running OpenJDK 11.0.4
My version of Excel both to create the 'template' and open the copy is Excel for Office365
I am running Docx4J v11.1.3 but I also tried with v8.1.5(both cases I had to use the Reference Implementation of JAXB to get around a marshalling error when trying to save)
I did see another post on Stackoverflow here about an issue related to fonts in Linux environments so I made sure to install the MS TT Corefonts but it didn't help my problem.
I ran the entire unzipped directory through BeyondCompare and there are some differences but I don't know which are just artifacts of the two different OS' or even which differences matter. Mostly they are:
small differences in file size
boolean values showing as "1", "yes", or "true" but not the same way for both files
namespaces and attributes in one file but not the other
Sheet1 from my blank workbook, before and after
All ideas are welcome.
Please try the just-released docx4j 8.1.6, which fixes handling of xlsx files created by recent releases of Excel. This was https://github.com/plutext/docx4j/issues/389
I have an Excel spreadsheet on a Sharepoint site that I would like to keep as read-only. However, my users will occasionally need to add small amounts of data, which I thought could be best stored in a small text file. I can read the text data into the Excel userform easily enough, and I can amend the text file with new data equally easy - but only if I have already checked the text file out. This doesn't work for other users of course. Is there some method of checking out a file - which isn't a workbook - out via Excel VBA, or will I have to switch to storing the updateable data in another workbook?
It is possible to use VBA to read textfiles. You can use this example for instance: https://www.excel-easy.com/vba/examples/read-data-from-text-file.html where you can read the data per line.