Monday, November 30, 2015

Warning: Could not start Excel server for export - Use xlwrite

Update 04/12/15 - The following steps will add xlwrite and its jar files to Matlab dynamic path. However, you will have to redo the steps again every time you restart Matlab. To go about this, add the jar files to Matlab static path. Check here.

I can use xlsread in Matlab for Mac successfully, however using xlswrite gives me the following error:


After some googling and trying on csvwrite, I find another code on Mathworks. I strongly suggest those out there that hesitate to use csvwrite to give this a try.

This pic-post will walk you through on how to use xlwrite.

Step 1:
1. Download xlwrite .

2. Unzip it and put all the files in your designated folder. (I'm a digital-organised freak).

Content of your downloaded files.

3. We want to know the path to all this POI files. On Mac, click cmd+i.
cmd+i to get the information of the files


4. In Matlab command windows, use javaaddpath to add all the needed jar files.

Or you can add 'xlwrite' to Matlab path. 




That's all. You can see 'test_xlwrite.xlsx' is created in your current folder.

See file xlwrite or go to <url> for full license details.

Tuesday, November 17, 2015

Windows 7 Startup Looping Infinitely

*** Feel free to jump to the end of this page for the potential solution ***

I have been neglecting to help anyone to reformat their laptop. Installing Windows used to be an easy and straight forward job. Ten years ago you probably need 4 parts: Get a working Windows installer, Format the desire partition, re-install windows, install utility drivers (come along with your laptop in a CD)

But now, you no longer get the Utility CD when everything just a click away. Maybe few clicks away...

Back then, all laptops more or less the same. What made it difference are the specs, what's the CPU used, RAM and hard disk capacity, graphic card etc. But today, with product differentiation, by making the product unique and attractive to consumers, a laptop no longer just about its hardware specification and operating system. 

I only have one windows laptop which is by Acer. I'm pretty happy with. I got it slightly cheaper than the retail price because it was open OS. Meaning the shop that sold it to me installed a non-genuine Windows for me to get started. I don't mind. Acer's laptop in 2009 have another feature called Empowerment Technology (if I'm not mistaken hehe). However that function on my keyboard never seems to response every time I press on it. And yeah 7 years later I still have no idea what I missed from not having this feature on my Acer. 

On the contrary, that could be what I gain. I lost count on how many times I formatted this Acer laptop and I never really encountered any weird problems. It usually took me maximum of 1 hour to format and reinstall, get it up and running like new. 

But hell, yesterday I spent more than 10 hours just to re-install Windows 7 on an Asus laptop. 7 years ago, my Acer was differentiated by one feature, which I happy not to have. But Asus today ... wow. All I can is you should leave formatting a laptop to the professional technician. Where they have all the necessary utility drivers and  access to fast internet in case they need to look for one. 

Ok, so when I almost finish installing Windows 7 on Asus, as usual I get the message that the system will restart several times to complete the installation. And I was like.. Ok.. whatever, just get it done. 

The system was not just restart like 5, 6 or 7 times, but I lost count. I checked my timer, this is unusual. It has been more than an hour and still not done? I was reinstalling about 3 or 4 times, trying both 32 and 64 bit. Then I know I fall into the startup loop. What I can observe: boot up > "windows is loading files" > windows logo > Asus background > boot up

I was googling around and found some commands to try, but to no avail in my case. 

Anyway you may check out this link first, it may work for you, but if NOT, try the steps below :
  1. Boot up using your windows installer
  2. Click repair/ system recovery options
  3. Choose command prompt (If your path is X:\Sources,set it to C, just type C:)
  4. Type the following command
bootrec /fixmbr 
bootrec/fixboot 


It's true everything is just one click away, but the RIGHT solution could be 1000 clicks away.