--> atomsInstall("xls_link")
xls_link (Automation link with Excel) A easy way to call excel(TM) from Scilab
Upload date : 2013-03-29 10:32:29 MD5 : fe0a64b037edd283f92c0d22704bee90 SHA1 : 039eb20e3a14a971f524b149ff0a0c559c1d5a04 Downloads : 182 File list
Windows 32-bit Automatically generated by the ATOMS compilation chain
Upload date : 2013-03-29 12:40:47 MD5 : 3f768b6fb10b277853d87670b7dd7fbe SHA1 : 929e476d6ed429b142827615697ca9d1c9997d46 Downloads : 370 File list
Windows 64-bit Automatically generated by the ATOMS compilation chain
Upload date : 2013-03-29 10:51:09 MD5 : 518f7a1e0c762b18f3851285cc851e3e SHA1 : e64edaae07738a419dac4bbe7fcc7e5b3d727d39 Downloads : 849 File list
I have tested this version too. I encounter the same problem here. There's a bug with xls link and Scilab 32 bit. When I use SetWorksheet an error comes out. It's impossible the Set a Worksheet. This bug affects only 32 bit xls link version. I usa also 64 bit version and there aren't no bugs. I have to use the code I have written on computers based on x86 and x64 so I need that xls link 32 bit work correctly. This is the code that doesn't work properly /Open Excel path_dir = "your_path_dir" excelfileName=([path_dir + "test.xls"]); r = xls_NewExcel(); r = xls_Open(excelfileName); //xls_SetVisible(%t); xls_callMethod("application", "workbooks", 1) //select first workbook // Read Serial xls_SetWorksheet(1); It crash on xls_SetWorksheet instruction. If you can fix it, I will appreciate a lot. If you need more datail to fix this bug I'm here to help. Thank You
Hi, I ran your test case on my computer ( Win 8 64 bits with scilab 5.4.1 32bits and Excel 2003 SP3 ). -->[a,b] = getversion() b = !ICC x86 tk modelicac release Mar 29 2013 17:40:34 ! a = scilab-5.4.1 -->atomsGetInstalled() ans = !xls_link 0.3.2-1 user SCIHOME\atoms\xls_link\0.3.2-1 I ! --> xls_GetExcelVersion() ans = 11.0 excelfileName = xls_getRootPath() + "tests\unit_tests\xls_CopyDataRange.xls"; xls_NewExcel(); xls_Open(excelfileName); //auto select last opened workbook and its first worksheet. //you do not need anything more. //the tip with xls_callMethod was only when you recovery an existing excel. //but if I try to execute others commands : -->xls_callMethod("application", "workbooks", 1) ans = T -->xls_SetWorksheet(1) ans = T It is not easy to fix a bug that I cannot reproduce. Let's me find and check on a windows 32 bits and I came back to you, perhaps with good news. Thanks for reporting. Antoine
I know that isn't easy. I'm using too a Windows 7 64 bit version to build the Scilab script and it work s fine, but the problem is on windows 32 bit. Both windows 7 and Xp 32 bit version report an error when trying xls_SetWorksheet. If you don't have a computer with Win 32 you can use Virtual Machine as Virtual Box (that's open and free ^^) or VMWare (which I prefer, but you have to pay). In a Virtual Machine you can install Windows 32 bit (Xp, Vista, 7, 8, ecc. ) is a better choise. So you can have all the running operative system you want. ^^ I use a lot when I have to check if the program I write working properly on other systems. If you need other information about the configuration I was using when the bug appears or other information I'm here to help you. Many Thanks!!
Hi everyone, I'm using the 64 bit version with Scilab 5.4.1 and Windows 7 Italian. My computer is configured to use the dot (".") as the decimal separator, and in Excel and Scilab everything works fine. However, when I use xls_link and I read an Excel range with xls_GetData(Range), I get the numbers with comma(",") as a decimal separator, so the conversion with strtod() gives me wrong results. Is there a way in xls_link to force it to use the dot as a decimal separator? Thankyou in advance. Alessandro
If your numbers are string you can replace comma with dot. I think the best way is to replace comma in the excel file (CTRL+SHIFT+T), but I think you can replace also with Scilab using the string as an array of char. After you have replaced commas with dot I think that it will works. This solution helps you? Let me know, please. ^^
Hi Ben, Thanks for your reply. I resolved the problem choosing English as the default language in Scilab (by default it was Italian) and by default it takes the dot as the decimal separator. Everything is OK :-)
Hi, Very useful module! I encounter an issue with Xls_SetData() that don't work properly when the specified range is a row. For exemple, Xls_SetData("A1:B1",["mois:","Cumul:"]) gives the following result: cell A1= "mois:" and cell B1 "mois:" instead of: cell A1= "mois:" and cell B1 "Cumul:". It works properly when ranges are columns or more than two rows. I use windows7, Excel 2010 and Scilab 5.4.1. Best regards