ExcelJS: doesn't save file properly - exceljs

I wrote an script and here's an snippet from my code:
let workbook = new Excel.Workbook();
await workbook.xlsx.readFile('./input.xlsx');
await workbook.xlsx.writeFile('./output.xlsx');
console.log('file saved!');
I know how async/await works and there is no error!
the input.xlsx is a valid excel file. but the output.xlsx can't be opened by libreOffice or Microsoft Excel.
I should notice that if I comment await workbook.xlsx.readFile('./input.xlsx');, in this situation also the output.xlsx can't be read too!
It's an strange issue for me! I used exceljs many many times but I don't know why it's happening now!
exceljs version: 3.9.0

I suppose that exceljs hasn't implemented at least one feature used in input.xlsx.
Similar situation I had with images some times ago and fixed by PR: https://github.com/exceljs/exceljs/pull/702
Could I ask you to create an issue on GH?
If you want to find what exactly went wrong:
unzip input.xlsx
unzip output.xlsx
check diff between.
You can also upload input.xlsx here, it should help to find a bug reason.
I think also, check any other version of exceljs may be helpful.

Related

React-Native-Vision-Camera Exception when reading a QR-Code

I'm using react-native-vision-camera to build a QR-Code-Scanner for my app. I followed this guide by dynamsoft: https://www.dynamsoft.com/codepool/react-native-qr-code-scanner-vision-camera.html
In the beginning everything worked fine but now I'm always getting an Exception when reading QR-Codes with my camera. Even with the provided example project in the post it's not working properly anymore.
The detected result I get always has asterisks in it like this: [Attention(exceptionCode:-20111)] *ttp*//**ca*h*st*9*02/*entalobje*ts*book**98420*d*6b**-4***-9e***6*d796*0c*55
I already tried reinstalling the library and everything but I can't get it to work.
vision-camera-dynamsoft-barcode-reader has an internal dependency on DynamsoftBarcodeReader SDK and it needs an active license, which I found out in their other examples. In all their examples, public license are used which has an expiration date.
Due to this reason, I made a switch to vision-camera-code-scanner. This was already suggested in Community Plugin List of VisionCamera.
Hope this helps!

Can't run MusicStore sample

when I'm trying to run the MusicStore sample described here the download of docker images breaks with following error.
Can someone confirm this?
The instructions need to be updated. There were two Config Server paths steeltoeoss/configserver and steeltoeoss/config-server. This was confusing and the first one was cleaned up. Please use steeltoeoss/config-server now.
A ticket will be created to fix the readme.
Thanks for pointing it out.

How to get Swagger UI to work based on documentation guide? (even the example)

I am trying to use Swagger UI to document our node.js API, so I went to http://swagger.io/docs/, down to Swagger UI Documentation -> Usage, to find this
Now, this is not the only place that provides these instructions, there are dozens of blogs & tutorials saying the same thing, so that's exactly what I did.
Cloned the repo, went into /dist/ and ran the /dist/index.html and all I get is an empty page with an error:
I'm slowly going crazy now as I can't find anything about it and literally every place I looked just has the same, copied, instructions with nothing else provided (like what could go wrong? you just open a file...)
Any help or explanations are much appreciated!
P.S. for some reason opening the /public/index.html works (mentioned nowhere on the www)
I think this is bug in new version of swagger-UI. This is fresh release and they are still modifying and fixing bugs.
Look here: Swagger-ui cannot access JS scripts. This seems to be similar problem, maybe it will help you.

SharpDX - AssetNotFoundException

Sorry to raise this question again as I see it has been asked a few times however the solutions have not helped me.
The code I am trying to get to work is one of the sample examples, desktop version of SpriteBatchAndFont https://github.com/sharpdx/SharpDX-Samples/tree/master/Toolkit/WindowsDesktop/SpriteBatchAndFont
My particular problem is that font Arial16.xml and the balls.dds image raise the AssetNotFoundException.
From previous posts I have noted and checked the set up of a relative directory for loading contents - Content.RootDirectory = "Content"; and checked that the font and the image are in that named dir. Further I have noted and checked that the Build Action is set to ToolkitFont and ToolkitTexture for the font and texture respectively.
I have also read that the project may need to be in the %Documents% folder (do not understand why that would be, but tested it anyway) and also that the Contents folder may not have the required Windows permissions.
It may well be something simple that I am not aware of but I have been at this for a few days and have now run out of ideas and googling ability. I would be grateful for any help or pointers. Thanks.
I wasted hours triying to figure it out, as all official examples and tutorials on web doesn't mention that.
Changing directory to Content.RootDirectory = #"\Content"; finally worked for me.

How to use component from the old indy9 package

I have upgraded Indy9 to Indy10 in Delphi7. Took some time for me to change all the parts with TCP servers and clients but seems like it works nice now.
Now, i noticed one part is still not working, and thats idHTTPserver component.
Our applications web page is using a mootools library. With Indy9 idHTTPserver it works perfectly, however Indy10 does something, which makes browsers fail to display the page.
Besides some other errors, there is this nonsense error like (Firefox Error console output):
Timestamp: 2013.08.07 13:13:56
Error: SyntaxError: missing ] after element list
Source File: http://192.168.100.2:8780/lib/ui/core/mootools-1.2.4-more-yc.js
Line: 103, Column: 60
Source Code:
unction(){var b=["C?","C ","C","C?","C,","C¢","Cƒ","C£","C"","C¤","C.","C?","Ä,","ă","Ä"","Ä.","Ä?","Ä?","ÄŒ","Ĩ","C?
-------------------------------------------------------------^
The actual source code inside this .js is:
long long text ....... function(){var b=["C?","C ","C","C?","C,","C¢","Cƒ","C£","C"","C¤","C.","C?","Ä,","ă","Ä"","Ä.","Ä?","Ä?","ÄŒ","Ĩ","C?","C§","Ä?","ĸ","Ä","Ä'","Cˆ","CØ","C?","C©","CŠ","CR","C<","C«","Äš","Ä>","Ę","ÄT","Ä?","ÄŸ","CŒ","C¬","C¨","C­","C?","C®","C¸","CÆ","Ĺ","Är","Ľ","ľ","Å","Å,","C'","C±","Å?","ň","Ń","Å"","C'","C²","C"","C³","C"","C´","C.","Cµ","C-","C¶","C˜","Cø","Å'","Ř","ÅT","Å"","Å.","Å ","Å?","Å?","ÅŸ","Åš","Å>","Ť","Å?","Ť","Å?","Å¢","Å£","CT","C¹","Cš","Cr","C>","C»","Cœ","C¼","Å®","ÅÆ","Åø","Cæ","C½","C¯","Ž","ž","Ź","År","Å»","ż","C?","C¾","C","C°","CŸ","Å'","Å"","C?","C¦","Aµ"]; ................ long long text
What is happening here?
I took a deep breathe and thought, hey i could just use the old version of idHTTPserver as i still have the source files of Indy9 in the other folder.
If nobody knows how to fix the indy10 HTTPserver, could somebody please tell me how do i use the old version? Just the HTTPserver component (which surely links with 10s of other old indy files).
I tried to include the old sources, but it was becoming a mess, because it would use the idHTTPserver.pas from old version, yet idCustomHTTPserver.pas (this is what happens after i follow the uses of idHTTPserver.pas file) from new version...
To use a different Indy version in one project, set the project search path to Indy\Lib\Core, \Protocols and \System, and instantiate all components in code.
This also has the advantage that you can avoid the uninstall / install steps to switch between different Indy 10 versions.
While this is not the direct answer to my own question in title, this did solve my problem.
I followed the function HTTPserver.WriteContent which led into idHTTPServer.pas, then compared idHTTPServer.pas files of Indy9 and Indy10, the parts about encoding in Indy10 caught my attention.
At line 2039 i have removed the second argument of the write function
FConnection.IOHandler.Write(ContentText, CharsetToEncoding(CharSet));
replaced with
FConnection.IOHandler.Write(ContentText);
This solved my problem. Everything works fine now.
The main problem here was, as commenters have noticed, the extra " symbols.
I was quite stupid because i clicked the link in the firefox console and it opened the javascript file which was of wrong version and for some reason i thought this was what it was supposed to be. Only a bit later i decided to check the actual file on my PC and it turned out that "C"" was not even C, the actual text is this
var b=["À","à","Á","á","Â","â","Ã","ã","Ä","ä","Å","å","Ă","ă","Ą","ą","Ć","ć","Č","č","Ç","ç","Ď","ď","Đ","đ","È","è","É","é","Ê","ê","Ë","ë","Ě","ě","Ę","ę","Ğ","ğ","Ì","ì","Í","í","Î","î","Ï","ï","Ĺ","ĺ","Ľ","ľ","Ł","ł","Ñ","ñ","Ň","ň","Ń","ń","Ò","ò","Ó","ó","Ô","ô","Õ","õ","Ö","ö","Ø","ø","ő","Ř","ř","Ŕ","ŕ","Š","š","Ş","ş","Ś","ś","Ť","ť","Ť","ť","Ţ","ţ","Ù","ù","Ú","ú","Û","û","Ü","ü","Ů","ů","Ÿ","ÿ","ý","Ý","Ž","ž","Ź","ź","Ż","ż","Þ","þ","Ð","ð","ß","Œ","œ","Æ","æ","µ"];
So, i was right. When the whole text goes through CharsetToEncoding, it translates all these single symbol characters into 2 symbols.
I will not accept my own answer as it doesnt really answer the title question and i would love to know if its possible to use a single component of older version while the rest are newer.

Resources