Cannot set cell value in Phpspreadsheet - phpspreadsheet
So this is very similar to ticket phpspreadsheet setCellValue is not writing however I cannot set the cell value for XLSX or ODS files at all in Phpspreadsheet (ODS files can crash explorer in my experience). I have the following function which worked fine in Phpexcel and still works fine for XLS but as I say - not XLSX or ODS. I've tried 2 setting methods - both have the same results. I don't get any error but the browser simply exits with "This site can’t be reached". I'm running LAMP and Ubuntu. Why is this not working?
public function setCell($ref,$value){
//$this->active_sheet->setCellValue($ref,$value);
$this->active_sheet->fromArray(array($value),null,$ref);
}
So after a lot of investigation - this issue is the same bug as reported here: https://github.com/PHPOffice/PHPExcel/issues/846. It turns out running $writer->setPreCalculateFormulas(false); before outputting with save() fixed this issue.
Related
iOS 8 Safari indexedDB.open returns null
We are developing web app, that uses framework that uses indexedDB. All was going fine, but then we tested it on iPad and suddenly it didn't load the page at all. Thought it would be some minor issue, but after some tests we found out, that the app is crashing on: TypeError: null is not an Object validating 'request' It crashes on the line : var request = indexedDB.open("FMVare",415); This stores null in the request variable so then after that there is: request.onerror(...) Which will get us the error message, written above. I spent one day looking for a fix, but only found that iOS implemetation of indexedDb is "buggy". But I cant even open a database, so there probably is problem somewhere else. My colleague also told me, that it was working fine like 1 month before, but the file with this implementation (according to git) didn't change... ever. I tried using pollyfill to change it to the WebSQL, again it worked everywhere except iPad browsers (Safari, Chrome). This time it was throwing different error, which I only could google as far as some SQL syntax error, which obviously couldn't be the case, if it is working everywhere else. I have tried some suggestions, which said to replace in that pollyfill indexedDB with _indexedDB etc. but again, it worked everywhere but iPad. When I log the variable request, it returns null. If I log indexedDB or window.indexedDB, it returns IDBFactory object, so it's there, but the .open method is failing, without calling .onerror or .onsucess method. Since I really found many people complaining about indexedDB bad implementation on iOS, it means they were able to use it. So what could be the problem in my iPad? I mean I can try update to iOS 9, but that's not exactly what are we trying to achieve. I tried deleting cache, changing version number(greater and smaller), creating different database (different name), pollyfill... but still can't get it working, everytime i call indexedDB.open(databasename), it returns null and crashes. Any ideas? EDIT: The error I'm getting with shim is Error in sysdb transaction - when creating dbVersions. Then I get the SQLError object with "code: 5" and "message: could not prepare statement (1 not authorized)" The error happens in createSysDB(success, failure) function of the shim. UPDATE: I tried an app on iPad called WebView Rendering so i could try if WKWebView would be capable of running my app. And it was! So the problem really was the UIWebView support of IndexedDB. Seems very strange to me though, that you can't use IndexedDB on iOS Safari even after update on latest iOS version.
Cordova resolveLocalFileSystemURL success call back failing on iOS
I've just created a new project and installed the file and file-transfer api's via CLI. I have already created a working app previously so I know how to use phonegap and have been doing so for a few years now. Here is the code: window.resolveLocalFileSystemURL("file:///localhost/var/mobile/Applications/96B4705C-C70D-4340-9A42-HJ1F28355D43/tmp/cdv_photo_015.jpg", function(fileEntry){ console.log(fileEntry.name); }, function(error){ console.log('about to resolve this files errors'); console.log(error.code); }); Nothing ever gets outputted in the console debugging window ...and yes I have debug installed cause I have console.log() in other parts of my code that show up. It seems like there is an issue when passing URL data from navigator.camera.getPicture() to the file API when using window.resolveLocalFileSystemURL()...any ideas anyone. I'm up to date on phonegap api and everything and I have this issue for the past few days now...I can't seem to solve it. ***EDIT*** Seems like when you use Camera.DestinationType.FILE_URI as a parameter for navigator.camera.getPicture(). When you choose a picture and the success call back for navigator.camera.getPicture() is triggered, trying to window.resolveLocalFileSystemURL from the URL that getPicture returns just fails. But if you set Camera.DestinationType.NATIVE_URI it at least returns something but it's in a format that can't be used with the file-transfer api exp: assets-library://asset/asset.JPG?id=220BCEAE-F1EA-4A6A-83B2-AB8833A90BF2&ext=JPG
Seems like this was a bug in the file api v1.0.0 https://issues.apache.org/jira/browse/CB-6116 Temp solution is there as well. Seems like "/local/" was causing the issue. Remove it from incoming uri's if it exist and the resolve should work.
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.
JQuery Mobile. Was working, but now has a bug
I have an app that uses jquery.mobile-1.0a4.1.js. The script has worked every time, but now when I try it there is a 1 in 3 chance that I will get this error: $.mobile.pageContainer is undefined [Break On This Error] $.mobile.pageContainer.addClass(className); I have added the origional version and tried again, but I still get the error (line 2425) Is there any JQuery Mobile version I get that will be error free? Again this error is in the mobile file, and not my code (jquery.mobile-1.0a4.1.js) Edit I get the same issue when I use the min version as well jquery.mobile-1.0a4.1.min.js
"1 in 3 chance" to me sounds like you have a race condition based on the download times of your scripts. You may want to look at firing custom events when everything is downloaded and ready to go instead of having a downloaded script immediately executing.
Again this error is in the mobile file, and not my code The error is being reported in the JQuery mobile code, but it could be caused by an error in your script. Try creating a simple test script that uses JQuery mobile to see if you still get the error.
Make sure you still link to the correct JQuery.js file and that's still up. It's always best to download a working JQuery script and host it on your own server though. So no changes will ever be made to it. As for your question if there are other JQuery Mobile versions, I'm sure there are.. But that's what Google will help you with.
hdf viewer on windows for tables created using pyTables?
viTables only seems to work with python 2.5. I have downloaded HDFView, but when I try to open a table I created following this tutorial, I get the following error message: Failed to open file C:\tutorial.h5 java.io.IOException: Unsupported fileformat - C:\tutorial.h5 Any ideas for getting HDFView to work? Is there something I need to do when I'm using pyTables from python to make the format more generic? Any other good HDF viewers? Btw, I've just discovered PyTables, and I'm really excited about it.
ViTables works for me with python 2.6 on windows. It is supposed also to work with 2.7. However the version on the official site did not work for me and crashed. In a mailinglist posting I found the link to the berlios ftp server where I got a version that works like a charm.
Have you seen ViTables? http://vitables.berlios.de/