xls

Read only specific sheet

混江龙づ霸主 提交于 2019-11-30 11:17:13
I am trying to read just one sheet from an xls document and I have this: $objPHPExcel = $objReader->load('daily/' . $fisierInbound); $objWorksheet = $objPHPExcel->setActiveSheetIndex(0); foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { $worksheetTitle = $worksheet->getTitle(); $highestRow = $worksheet->getHighestRow(); // e.g. 10 $highestColumn = $worksheet->getHighestColumn(); // e.g 'F' $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn); $dataCalls = $worksheet->getCellByColumnAndRow(2, 2)->getValue(); $dataSubstr = substr($dataCalls, 53); } The problem

export mysql result to excel

喜欢而已 提交于 2019-11-30 10:58:16
I found a little script that will export information to an xls file, but I can't seem to get it working. The original code is found here: http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8 And here's my code: // Query Database $query = 'SELECT * FROM #__db_clients WHERE published = '1' AND companyid IN (1,2) AND country = 'Africa' ORDER BY state ASC'; $db->setQuery($query); $rows = $db->loadObjectList(); if ($rows) { function xlsBOF() { echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); return; }; function xlsEOF() { echo pack("ss", 0x0A, 0x00); return; }; function

Convert XLS to CSV on the server in Node

会有一股神秘感。 提交于 2019-11-30 09:07:24
I have a client-side web application, with a very minimal node server to access some data that the client can't. One of these things is excel spreadsheets with .xls extensions. I'm trying to get my server set up to download the xls, convert it to csv, and then send it back to the client. I've got the download part done, and I'm sure I can figure out the "send back" part, but I can't for the life of me find a good library to convert from xls to csv. Can someone point me to a library that can do that in a simple fashion? The excel file is just one sheet, no complicated workbooks or anything. Or

export as .xls file not work when large data

元气小坏坏 提交于 2019-11-30 09:00:23
问题 I am using the javascript code for export html table to .xls file.Its work in crome and when data is not large.But when data is large then it shows me error like The code which i have used for export the table as .xls file is as below: function exportDiv() { //working on crome perfectly var dt = new Date(); var day = dt.getDate(); var month = dt.getMonth() + 1; var year = dt.getFullYear(); var hour = dt.getHours(); var mins = dt.getMinutes(); var postfix = day + "." + month + "." + year + "_"

Convert CSV into XLS

╄→尐↘猪︶ㄣ 提交于 2019-11-30 05:18:05
I'm working in a web application separated in blocks and I'm getting a CSV object from a work mate of mine which I must convert into XLS to be passed into an Excel Processor they built. This CSV object is delimited by the character ";". What I'd like to know is how I can convert the CSV object into XLS programatically. It should be easy for you to convert the CSV object into an array of arrays of strings and then do like in the following example (you'll need to add a reference to Microsoft.Office.Interop.Excel): using Excel = Microsoft.Office.Interop.Excel; Excel.Application excel = new Excel

Response.ContentType application/vnd.ms-excel xls stopped working

风格不统一 提交于 2019-11-30 01:54:37
问题 I've done some pretty deep searching on this issue with no luck. It seems that in the past couple of days the output to XLS from HTML has stopped working on many legacy (read: Classic ASP) systems I support. I've been able reproduce this on multiple servers, multiple independent source code from Office 2010 through Office 2016. I've looked at everything I can think of without success so I'm curious to know if there is something I might be overlooking. I'm starting to think this may be a bad

Download excel file from page via WebApi call

我的梦境 提交于 2019-11-30 01:20:43
问题 I'm trying to send a 9MB .xls file as a response from web api controller method. The user will click a button on the page and this will trigger the download via the browser. Here's what I've got so far but it doesn't work however it doesn't throw any exceptions either. [AcceptVerbs("GET")] public HttpResponseMessage ExportXls() { try { byte[] excelData = m_toolsService.ExportToExcelFile(); HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK); var stream = new MemoryStream

Dates from Excel to R, platform dependency

痴心易碎 提交于 2019-11-29 22:39:06
I'm importing xls files using gdata . I am converting date columns using as.Date to convert the date As per the manual for as.Date , the date origin is platform dependent, and so I am determining which origin to use accordingly .origin <- ifelse(Sys.info()[['sysname']] == "Windows", "1899-12-30", "1904-01-01") as.Date(myData$Date, origin=.origin) However, I'm wondering if I should be considering the platform where the file is being read or the platform where it was written ? For what it's worth, I am currently testing the code on a linux box with no excel, and the correct Dates are produced by

C#打开文件

戏子无情 提交于 2019-11-29 18:57:35
C#中经常用到的功能,打开文件: /// <summary> /// 打开文件,可选择多个文件 /// </summary> /// <param name="fileExt">输入文件尾缀名,不包含"."</param> /// <returns></returns> public static string[] OpenFiles(string fileExt) { OpenFileDialog dialog = new OpenFileDialog(); dialog.Multiselect = true;//允许打开多个文件 dialog.DefaultExt = fileExt;//打开文件时显示的可选文件类型 dialog.Filter = fileExt + "xlsx文件|" + "*." + fileExt+"|xls文件|*.xls";//打开多个文件 if (dialog.ShowDialog() == DialogResult.OK) return dialog.FileNames; else { MessageBox.Show("返回文件路径失败"); return null; } } 其中 dialog.Multiselect = true 允许同时打开多个文件,选择中多个文件后,返回一个filenames数组,可以用如下代码遍历所有文件操作:

Issues converting csv to xls in Java? Only core Java experience needed - question not related to import

亡梦爱人 提交于 2019-11-29 18:17:18
First of all, I understand that it's unusual that I want to up-convert like this, but please bear with me. We get these csv files via website export and we have no options to get it in any other form. Now, onto the question: I have this old code that will do this process for me. It basically reads each line, then picks out each value between the , s. This worked great for some samples that I converted, but when it came down to working with the samples given, some values were out of place. I opened the files in Notepad++ and realized that some of the cells, themselves, contained , s. CSV files