I want to export excel data of multiple languages to resource files in Visual studio and i do not want to copy paste each single row (key and value) to resource file as i have data for about 7 web pages with each page containing 20 rows.
I have worked on exporting .resx to .xlsx earlier using a very good tool : http://www.zeta-resource-editor.com/index.html but it does not work otherwise (.resx to .xlsx)
One major challenge i am facing is: the number of rows in excel are less than the number of key-values in .resx i.e i do not have the whole content translated in excel
I have tried microsoft's in-built tool (https://msdn.microsoft.com/en-us/library/bbwz4bhx(v=vs.90).aspx) but it imports excel as excel/csv itself and not as .resx
Also giving a try to http://resxresourcemanager.codeplex.com/
which is throwing error : could not find a matching file in Solution..
Any suggestions for tried and tested tool will be highly appreciated :)
http://resxresourcemanager.codeplex.com/ could help but it always throws errors saying sheet and solution's resx file names does not match, even if you create a rex file on root and provide same name to excel sheet.
So i opted for manual copy-paste.. was not much time consuming :)
Related
I recently created an automated Excel utility (using Microsoft Office 2019), in which I've extensively used data validations, VBA code, named ranges and formatting. It was working well until one day I received an Excel prompt message that read:
When I click on Yes, it gives me another pop-up where it says it recovered the file, and also gives me a link to the error log XML file. I click on it and open the .xml file using my default browser, and it shows the following details:
Looks like it is removing data validations from a particular sheet, and I realize that is true when I navigate to that sheet in the UI. To work around this unwarranted and repeated data-validation removal that Excel application is enforcing, I created a macro code that will re-instate all these data validations as required. The real problem arises when this Excel file is opened on a different computer with Microsoft Office 365. Looks like it is removing not just data-validations but also other components like named ranges and buttons. There could be other things that it might be removing, which I am unaware of at the moment. So the macro created to re-instate the data-validations is no longer useful.
Why does this problem arise? And why is different version of Excel behaving differently? How do I solve this? Appreciate your kind help. Thank you!
As rightly suggested by Ron Rosenfeld and e_conomics, the issue was with the data validation lists, whose sources were strings of comma separated values that were going beyond 255 characters. Apparently, that is a limitation with Excel.
When I replaced the sources of data validation lists (string of comma separated values) with the ranges containing the corresponding values, the problem resolved itself. The repair dialogue never appeared again.
I have a program which generates an Excel file. Specifically, it's a node app which generates a JSON file which is loaded into GrapeCity's SpreadJS and exported again via their ExcelIO libs. This file has a lot of formulae in it - at least a thousand of various forms built according to various rules from an input data set which is itself non-trivial. Whilst these files load file in SpreadJS and export in such a way that they load in Excel and appear to work, I get a number of errors from Excel when I try to load it:
Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
Removed Records: Formula from /xl/worksheets/sheet1.xml part
Removed Records: Formula from /xl/worksheets/sheet2.xml part
Removed Records: Formula from /xl/worksheets/sheet3.xml part
After I initially posted this question, I eventually figured out that this was because the formulae in question were using single quotes for text strings rather than double. The question is - without playing guessing games, how could I identify which formulae Excel has removed / fixed? Excel's so-called log file is just a repetition of the equally unhelpful references.
Any of the following would count as good answers:
A way to get Excel to tell me the string of the formula which it has a problem with
A way to get Excel to tell me the cell reference (e.g. F5) of the formula which it has a problem with
An external tool which would do the same
A library or tool for validating Excel formulae which I could run on either the Excel file or the original input which would give me similar output. If it was an npm lib that would be even better
thank you for using SpreadJS.
Can you please share the original spreadjs file (ssjson) with our team, they can perform the export and figure out what might be causing this. In general exported files should not product file open errors, even if the formula is incorrect.
Grapecity Team
http://www.grapecity.com/spreadjs
https://github.com/LesterLyu/fast-formula-parser/ works for verifying formulae.
I'm working on a long project and there are many betas with overlapping functionality. I keep raising the number of the beta after making substantial changes.
This file imports a bunch of data from spreadsheets which are exported feeds from a SQL database. It does this with no problem and that part of it has been working for months - importing some raw data sheets and using both cell references and VB to look at it different ways, and I set up a checklist page where the end user can go through certain records one by one and classify them.
All of this works fine and I really only made a few changes today, just finishing off little bits of code that take some data from one sheet and rearrange it in another to export. It was all working with no errors and I copied the file into a new folder (which I have been doing with these templates for months), imported my data (test data in this case), and tried to run the function that copies some info from one sheet onto an another.
Then I get an error from Excel that says "we can't connect to 'https://...my.sharepoint../BETAV9_8_ItemAccountingTEMPLATEetcetc. Please make sure you're using correct web address."
After that I click OK and then I get a second message that says:
Microsoft Excel cannot access the file 'same file' There are several possible reasons:
The file name or path does not exist
The file is being used by another program
The workbook you are trying to save has the same name as a currently open workbook
This file they're telling me they can't find is like 3 betas ago and I've been using subsequent versions without getting this error. That file isn't in the current working folder, nor in the folder from which I copied it originally.
So I'm thinking I have something in my file where there's a reference to an external file, so I went through this process: https://support.microsoft.com/en-us/office/find-links-external-references-in-a-workbook-fcbf4576-3aab-4029-ba25-54313a532ff1?ui=en-us&rs=en-us&ad=us
I don't know where to begin. There is only one thing in the Name Manager (a table that I created on one of these pages with VBA so I can sort it a couple different ways) and the button that says "Delete" is grayed out. There are several references in cells to other files - but not the BETAv9_8 it's telling me it can't find. They are simply file paths/names of the files the user imported - not hidden somewhere in code, just listed on a sheet so the user can check what data she imported.
After going through all these recommended steps I still can't find anywhere in my program that mentions BETAv9_8. In the meantime I'm getting an error for a thing that worked just fine a couple hours ago.
Is this a bug? Is there something I can do to fix it?
Thanks in advance
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'm processing xlsx files in PHP. When I create xlsx file using openoffice with just one filled cell, the spreadsheet already has 65536 rows itself. It looks like openoffice stores all cells even if they are empty. Is there any solution I can save only as many rows/columns as they are filled? Because every library for parsing xlsx produces then wrong number of rows so I'm not able to process it correctly. Good solution would be to achieve it directly inside openoffice, or use some external tool/script (*nix based) to clean up such xlsx file if possible.
Here is one solution:
Use OpenTBS to open the XLSX and save it with or without modifications.
OpenTBS is a pure PHP tools whose purpose is to merge data with LibreOffice and Ms Office documents using the technique of templates.
Since its version 1.9.0, OpenTBS can handle with XLSX workbooks made with LibreOffice. Such XLSX workbooks may have an extra row definition which contains a repetition attribute that extends it upon the maximum limit of row number. OpenTBS simply reduce this extra extended row into a single row.
OpenTBS download page
OpenTBS demo
OpenTBS doc