Search Results

Search found 565 results on 23 pages for 'xls'.

Page 3/23 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to create thumbnail images from DOC/RTF/PDF/XLS files

    - by imdadhusen
    I need to ask if any of you has any knowledge of creating file thumbnails on the fly. I have found a free component but it works only for PDF files, PDFThumbnailer. But my requirement is to convert DOC/RTF/PDF/XLS files to thumbnails on the fly, and if possible allow to save it as an image for later reference which currently PDFThumbnailer doesnt allow. PDFThumbnailer takes the pdf file and renders an image for it on browser, if that image can also be saved somehow to my machine that would be great too. Please guide me of how to achieve the above requirements. Any help for any filetype is appreciated. Thanks Imdadhusen

    Read the article

  • mySQL to .XSL help

    - by kielie
    hi guys, I have to create a script that takes a mySQL table, and exports it into .XSL format, and then saves that file into a specified folder on the web host. I got it working, but now I can't seem to get it to automatically save the file to the location without prompting the user. It needs to run every day at a specified time, so it can save the previous days leads into a .XSL file on the web host. Here is the code: <?php // DB TABLE Exporter // // How to use: // // Place this file in a safe place, edit the info just below here // browse to the file, enjoy! // CHANGE THIS STUFF FOR WHAT YOU NEED TO DO $dbhost = "-"; $dbuser = "-"; $dbpass = "-"; $dbname = "-"; $dbtable = "-"; // END CHANGING STUFF $cdate = date("Y-m-d"); // get current date // first thing that we are going to do is make some functions for writing out // and excel file. These functions do some hex writing and to be honest I got // them from some where else but hey it works so I am not going to question it // just reuse // This one makes the beginning of the xls file function xlsBOF() { echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); return; } // This one makes the end of the xls file function xlsEOF() { echo pack("ss", 0x0A, 0x00); return; } // this will write text in the cell you specify function xlsWriteLabel($Row, $Col, $Value ) { $L = strlen($Value); echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L); echo $Value; return; } // make the connection an DB query $dbc = mysql_connect( $dbhost , $dbuser , $dbpass ) or die( mysql_error() ); mysql_select_db( $dbname ); $q = "SELECT * FROM ".$dbtable." WHERE date ='$cdate'"; $qr = mysql_query( $q ) or die( mysql_error() ); // Ok now we are going to send some headers so that this // thing that we are going make comes out of browser // as an xls file. // header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); //this line is important its makes the file name header("Content-Disposition: attachment;filename=export_".$dbtable.".xls "); header("Content-Transfer-Encoding: binary "); // start the file xlsBOF(); // these will be used for keeping things in order. $col = 0; $row = 0; // This tells us that we are on the first row $first = true; while( $qrow = mysql_fetch_assoc( $qr ) ) { // Ok we are on the first row // lets make some headers of sorts if( $first ) { foreach( $qrow as $k => $v ) { // take the key and make label // make it uppper case and replace _ with ' ' xlsWriteLabel( $row, $col, strtoupper( ereg_replace( "_" , " " , $k ) ) ); $col++; } // prepare for the first real data row $col = 0; $row++; $first = false; } // go through the data foreach( $qrow as $k => $v ) { // write it out xlsWriteLabel( $row, $col, $v ); $col++; } // reset col and goto next row $col = 0; $row++; } xlsEOF(); exit(); ?> I tried using, fwrite to accomplish this, but it didn't seem to go very well, I removed the header information too, but nothing worked. Here is the original code, as I found it, any help would be greatly appreciated. :-) Thanx in advance. :-)

    Read the article

  • FileSystemWatcher.Changed fires immediately when Excel 2007 opens XLS file in compatibility mode

    - by Rick Mogstad
    We use a FileSystemWatcher to monitor documents opened from our Document Management system, and if the user saves the document, we ask if they would also like them updated in our system. We have a problem with XLS files in Excel 2007 (have not verified that the problem does not exist in 2003, but it only seems to be files that open in compatibility mode in 2007) where the Changed event fires immediately upon opening the file, and then once more upon closing the file, even if nothing has changed or the user chooses not to save upon closing. This same behavior does not exist when opening XLSX files. I wrote a test app to verify the behavior, which you can find at (http://www.just2guys.net/SOFiles/FSWExcel.zip). In the app, there is one FileSystemWatcher for each NotifyFilter type, so that it is apparent why the Changed event was fired. Any way you can think of to only prompt the user when the document is actually saved in some way by the user? I can start monitoring the file after Process.Start is called, which allows me to skip the message upon opening the document, but I still get one upon closing the document, even when nothing was changed.

    Read the article

  • Issue encondig java->xls

    - by Xerg
    This is not a pure java question and can also be related to HTML I've written a java servlet that queries a database table and shows the result as a html table. The user can also ask to receive the result as an Excel sheet. Im creating the Excel sheet by printing the same html table, but with the content-type of "application/vnd.ms-excel". The Excel file is created fine. The problem is that the tables may contain non-english data so I want to use a UTF-8 encoding. PrintWriter out = response.getWriter(); response.setContentType("application/vnd.ms-excel:ISO-8859-1"); //response.setContentType("application/vnd.ms-excel:UTF-8"); response.setHeader("cache-control", "no-cache"); response.setHeader("Content-Disposition", "attachment; filename=file.xls"); out.print(src); out.flush(); The non-english characters appear as garbage (áéíóú) Also I tried converting to bytes from String byte[] arrByte = src.getBytes("ISO-8859-1"); String result = new String(arrByte, "UTF-8"); But I Still getting garbage, What can I do?. Thanks

    Read the article

  • import the data in xls file and open them without Microsoft Excel

    - by user3669577
    I need to perform an application that cath values from SQL database after the esecution of a query. I must import the data in xls file and open them without Microsoft Excel. I'm a beginner and have too many problem. Can anyone help me. This is my code, at the moment: Option Infer On Imports System.Linq Imports System.Data.SqlClient Imports System Imports System.IO Imports System.Drawing Imports System.Drawing.Printing Imports System.Windows.Forms Imports ExcelLibrary.SpreadSheet Public Class frmLottiCaricati Dim CnSql As SqlConnection Private Sub frmLottiCaricati_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Me.MdiParent = Inizio 'TB_MinusValenza.Text = VariazionePrezzi.MinusValenza 'TB_Periodo.Text = VariazionePrezzi.Periodo 'DG_Prodotti.AutoGenerateColumns = False Try Dim StringaSql = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=" + Inizio.DatabaseSql + ";Data Source=" + Inizio.ServerSql + ";User ID=" + Inizio.UtenteSql + ";Password=" + Inizio.PwdSql CnSql = New SqlConnection(StringaSql) CnSql.Open() Dim command As SqlCommand Dim dadapter As New SqlDataAdapter Dim DS_Prodotti As New Data.DataSet Dim qry_Prodotti = "SELECT sistemaf.prodscadenze.Ministeriale, sistemaf.prodscadenze.Lotto, sistemaf.prodscadenze.Scadenza " & _ "FROM sistemaf.Prodscadenze " 'INNER JOIN sistemaf.Prodscadenze ON sistemaf.prodbase.Cod39 = sistemaf.prodscadenze.Ministeriale ;" command = New SqlCommand(qry_Prodotti, CnSql) dadapter.SelectCommand = command dadapter.Fill(DS_Prodotti) DG_Prodotti.DataSource = DS_Prodotti.Tables(0) 'DG_Prodotti.Columns("Descrizione").Width = 220 'DG_Prodotti.Columns("Ministeriale").Width = 60 DG_Prodotti.Columns("Lotto").Width = 60 'DG_Prodotti.Columns("Descrizione").AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells 'DG_Prodotti.Columns("Totale").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub End Class I can open the data only with Microsoft Excel now. Have any suggestions?

    Read the article

  • Converting text into numeric in xls using Java

    - by Work World
    When I create excel sheet through java ,the column which has number datatype in the oracle table, get converted to text format in excel.I want it to remain in the number format.Below is my code snippet for excel creation. FileWriter fw = new FileWriter(tempFile.getAbsoluteFile(),true); // BufferedWriter bw = new BufferedWriter(fw); HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("Excel Sheet"); //Column Size of excel for(int i=0;i<10;i++) { sheet.setColumnWidth((short) i, (short)8000); } String userSelectedValues=result; HSSFCellStyle style = wb.createCellStyle(); ///HSSFDataFormat df = wb.createDataFormat(); style.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index); style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); //style.setDataFormat(df.getFormat("0")); HSSFFont font = wb.createFont(); font.setColor(HSSFColor.BLACK.index); font.setBoldweight((short) 700); style.setFont(font); int selecteditems=userSelectedValues.split(",").length; // HSSFRow rowhead = sheet.createRow((short)0); //System.out.println("**************selecteditems************" +selecteditems); for(int k=0; k<selecteditems;k++) { HSSFRow rowhead = sheet.createRow((short)k); if(userSelectedValues.contains("O_UID")) { HSSFCell cell0 = rowhead.createCell((short) k); cell0.setCellValue("O UID"); cell0.setCellStyle(style); k=k+1; } ///some columns here.. } int index=1; for (int i = 0; i<dataBeanList.size(); i++) { odb=(OppDataBean)dataBeanList.get(i); HSSFRow row = sheet.createRow((short)index); for(int j=0;j<selecteditems;j++) { if(userSelectedValues.contains("O_UID")) { row.createCell((short)j).setCellValue(odb.getUID()); j=j+1; } } index++; } FileOutputStream fileOut = null; try { fileOut = new FileOutputStream(path.toString()+"/temp.xls"); } catch (FileNotFoundException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { wb.write(fileOut); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { fileOut.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }

    Read the article

  • mysql to excel generation using php

    - by pmms
    <?php // DB Connection here mysql_connect("localhost","root",""); mysql_select_db("hitnrunf_db"); $select = "SELECT * FROM jos_users "; $export = mysql_query ( $select ) or die ( "Sql error : " . mysql_error( ) ); $fields = mysql_num_fields ( $export ); for ( $i = 0; $i < $fields; $i++ ) { $header .= mysql_field_name( $export , $i ) . "\t"; } while( $row = mysql_fetch_row( $export ) ) { $line = ''; foreach( $row as $value ) { if ( ( !isset( $value ) ) || ( $value == "" ) ) { $value = "\t"; } else { $value = str_replace( '"' , '""' , $value ); $value = '"' . $value . '"' . "\t"; } $line .= $value; } $data .= trim( $line ) . "\n"; } $data = str_replace( "\r" , "" , $data ); if ( $data == "" ) { $data = "\n(0) Records Found!\n"; } header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=your_desired_name.xls"); header("Pragma: no-cache"); header("Expires: 0"); print "$header\n$data"; ?> The code above is used for generating an Excel spreadsheet from a MySQL database, but we are getting following error: The file you are trying to open, 'users.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now? What is the problem and how do we fix it?

    Read the article

  • mysql to excel genration using php

    - by pmms
    <?php // DB Connection here mysql_connect("localhost","root",""); mysql_select_db("hitnrunf_db"); $select = "SELECT * FROM jos_users "; $export = mysql_query ( $select ) or die ( "Sql error : " . mysql_error( ) ); $fields = mysql_num_fields ( $export ); for ( $i = 0; $i < $fields; $i++ ) { $header .= mysql_field_name( $export , $i ) . "\t"; } while( $row = mysql_fetch_row( $export ) ) { $line = ''; foreach( $row as $value ) { if ( ( !isset( $value ) ) || ( $value == "" ) ) { $value = "\t"; } else { $value = str_replace( '"' , '""' , $value ); $value = '"' . $value . '"' . "\t"; } $line .= $value; } $data .= trim( $line ) . "\n"; } $data = str_replace( "\r" , "" , $data ); if ( $data == "" ) { $data = "\n(0) Records Found!\n"; } header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=your_desired_name.xls"); header("Pragma: no-cache"); header("Expires: 0"); print "$header\n$data"; ? the above code is used for genrating mysql to excel sheet but we are getting following error the file youare trying to open, 'users.xls',is in a different format than specified by the file extension. verify that the file is not corrupted and is from a trusted source before opening the file. do you want to open the file now?

    Read the article

  • Excel parsing (xls) date error

    - by tau-neutrino
    I'm working on a project where I have to parse excel files for a client to extract data. An odd thing is popping up here: when I parse a date in the format of 5/9 (may 9th) in the excel sheet, I get 39577 in my program. I'm not sure if the year is encoded here (it is 2008 for these sheets). Are these dates the number of days since some sort of epoch? Does anyone know how to convert these numbers to something meaningful? I'm not looking for a solution that would convert these properly at time of parsing from the excel file (we already have thousands of extracted files that required a human to select relevant information - re-doing the extraction is not an option).

    Read the article

  • converting .doc and .xls file to html on rhel 4 server using php

    - by prateek
    i have a rhel 4 server and use php as a server side scripting language. There are many doc and excel files that are uploaded to the server daily. i make these files to be downloaded. i want to implement the view as html feature and they should preserve the formatting also. so which tools can be used or it can be done through php only. (on php4)

    Read the article

  • XSLT: use parameters in xls:sort attributes

    - by fireeyedboy
    How do I apply a parameter to a select and order attribute in a xsl:sort element? I'ld like to do this dynamic with PHP with something like this: $xsl = new XSLTProcessor(); $xslDoc = new DOMDocument(); $xslDoc->load( $this->_xslFilePath ); $xsl->importStyleSheet( $xslDoc ); $xsl->setParameter( '', 'sortBy', 'viewCount' ); $xsl->setParameter( '', 'order', 'descending' ); But I'ld first have to now how to get this to work. I tried the following, but it gives me a 'compilation error' : 'invalid value $order for order'. $sortBy doesn't seem to do anything either: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:param name="sortBy" select="viewCount"/> <xsl:param name="order" select="descending"/> <xsl:template match="/"> <media> <xsl:for-each select="media/medium"> <xsl:sort select="$sortBy" order="$order"/> // <someoutput> </xsl:for-each> </media> </xsl:template> </xsl:stylesheet>

    Read the article

  • XSLT: use parameters in xls:sort attributes (dynamic sorting)

    - by fireeyedboy
    How do I apply a parameter to a select and order attribute in a xsl:sort element? I'ld like to do this dynamic with PHP with something like this: $xsl = new XSLTProcessor(); $xslDoc = new DOMDocument(); $xslDoc->load( $this->_xslFilePath ); $xsl->importStyleSheet( $xslDoc ); $xsl->setParameter( '', 'sortBy', 'viewCount' ); $xsl->setParameter( '', 'order', 'descending' ); But I'ld first have to now how to get this to work. I tried the following, but it gives me a 'compilation error' : 'invalid value $order for order'. $sortBy doesn't seem to do anything either: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:param name="sortBy" select="viewCount"/> <xsl:param name="order" select="descending"/> <xsl:template match="/"> <media> <xsl:for-each select="media/medium"> <xsl:sort select="$sortBy" order="$order"/> // <someoutput> </xsl:for-each> </media> </xsl:template> </xsl:stylesheet>

    Read the article

  • How to read, edit and write xls files, and then export to SQL Server

    - by tuanvt
    I have an excel file that have the list of contacts( about 10 k of them) that I need to push into my SQL Server database. So, I am writing an .net windows program using visual studio 2008 to read the files, generate random password for each contact, and then push these information in to my SQL Server database. It was easy to handle excel file in 2003 but now my computer have office 2007 in it and things seem to changed. I am digging on Microsoft.Office.Interop.Excel but it is seem to be a lot more complicated than before.

    Read the article

  • How to determine the format of Excel file in Java?

    - by Samuh
    I am working on a light weight Java client library for Android mobile platform that can read and write to Excel files in .xls(BIFF) and Office 2003 XML format. No sooner we decided to start than we got stuck with a basic question. How do we determine the format of the excel files in Java? Please help. Thanks.

    Read the article

  • Color drop down in Excel cell (with no text)? e.g. bgcolor = Red-Green-Amber-unknown

    - by adolf garlic
    I have an Excel sheet that I'm using to keep track of the status of certain things. I want to have a column which consists of cells containing a repeated drop down that allows you to select (as background) red amber green unknown I don't want any text in this cell, I just want a coloured block. Is this possible? I've tried playing around with data-validation-list (based on range containing all of said colours but to no avail)

    Read the article

  • Can I make Windows to open Excel XML files with Excel without opening Explorer?

    - by Sorin Sbarnea
    I want to be able to open Excel XML files in Excel but without assigning XML directly to Excel. There are lots of XML files that are not Excel files and I don't want to open all of them in Excel. The file has proper header for opening in Excel but currently it does open Internet Explorer that asks me if I want to open the file with Excel, save or cancel. I just want to open it without two another annoying windows.

    Read the article

  • Google Docs : fin de l'export de documents aux « anciens » formats d'Office .doc .xls et .ppt, mais leur support sera toujours assuré

    Google Docs for Business : fin de l'export de documents aux « anciens » formats d'Office .doc, .xls, et .ppt, mais leur support sera toujours assuré par la suite Pas de nouveauté cette semaine pour les Google Apps for Business, mais une annonce qui intéressera les utilisateurs d'anciennes version de Microsoft Office (antérieures à 2007). La suite hébergée de Google ne permettra plus d'exporter des documents aux « anciens » (sic) formats que sont .doc, .xls, et .ppt. Un changement qui prendra effet dès le 1er octobre. Google précise cependant bien que Google Apps for Business continuera de supporter ces formats et qu'il sera toujours possible d'uploader ce type de doc...

    Read the article

  • excel import query error

    - by pmms
    mysql_connect("localhost","root",""); mysql_select_db("hitnrunf_db"); $result=mysql_query("select * from jos_users INTO OUTFILE 'users.csv' FIELDS ESCAPED BY '""' TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' "); header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=your_desired_name.xls"); header("Content-Transfer-Encoding: binary"); header("Pragma: no-cache"); header("Expires: 0"); print "$header\n$data"; in the above code in query string i.e string in side mysql_quey we are getting following error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\samples\mysql_excel\exel_outfile.php on line 8 in query string '\n' charter is not identifying as string thats why above error getting

    Read the article

  • Creating Excel Files with # in Column Name

    - by Superdumbell
    I'm having problem creating Excel files using Jet. When I create a table and give it a Column name as CreateTable [Sheet1] ([ColumnName#] String) It replaces the header column with ColumnName. Is there a way I can make excel give the column headers a name with out any conflict in what characters I can have in it? Are there any escape characters that I can use in the column names? Is there a cheap(~$50)/free .NET library that would give me better control over the Excel file that would allow me to create both XLS and XLSX files with out having excel installed? Basically what I'm trying to accomplish is having a DataTable get dumped into an Excel File and have the Column names appear just as they do in the in the DateTable.

    Read the article

  • Reading numeric Excel data as text using xlrd in Python

    - by Brian
    Hi guys, I am trying to read in an Excel file using xlrd, and I am wondering if there is a way to ignore the cell formatting used in Excel file, and just import all data as text? Here is the code I am using for far: import xlrd xls_file = 'xltest.xls' xls_workbook = xlrd.open_workbook(xls_file) xls_sheet = xls_workbook.sheet_by_index(0) raw_data = [['']*xls_sheet.ncols for _ in range(xls_sheet.nrows)] raw_str = '' feild_delim = ',' text_delim = '"' for rnum in range(xls_sheet.nrows): for cnum in range(xls_sheet.ncols): raw_data[rnum][cnum] = str(xls_sheet.cell(rnum,cnum).value) for rnum in range(len(raw_data)): for cnum in range(len(raw_data[rnum])): if (cnum == len(raw_data[rnum]) - 1): feild_delim = '\n' else: feild_delim = ',' raw_str += text_delim + raw_data[rnum][cnum] + text_delim + feild_delim final_csv = open('FINAL.csv', 'w') final_csv.write(raw_str) final_csv.close() This code is functional, but there are certain fields, such as a zip code, that are imported as numbers, so they have the decimal zero suffix. For example, is there is a zip code of '79854' in the Excel file, it will be imported as '79854.0'. I have tried finding a solution in this xlrd spec, but was unsuccessful.

    Read the article

  • Where to put to_xls and from_xls in a rails app

    - by Joe Arasin
    So I have a model that I need to be able to serialize to/read from an Excel(XLS) document. I am a bit of a loss as to where this code actually belongs. My initial thought is that the to_xls is a view, but after poking around and seeing things like (to|from)_xml and (to|from)_json in ActiveRecord, I was wondering if maybe this stuff belonged in the model. Alternatively, does it belong in just a whole separate container somewhere? For what it's worth, users will be downloading models from the site, modifying them in excel, then posting them.

    Read the article

  • Convert text files to excel files using python

    - by Rahim Jaafar
    I am working on INFORMIX 4GL programs. That programs produce output text files.This is an example of the output: Lot No|Purchaser name|Billing|Payment|Deposit|Balance| J1006|JAUHARI BIN HAMIDI|5285.05|4923.25|0.00|361.80| J1007|LEE, CHIA-JUI AKA LEE, ANDREW J. R.|5366.15|5313.70|0.00|52.45| J1008|NAZRIN ANEEZA BINTI NAZARUDDIN|5669.55|5365.30|0.00|304.25| J1009|YAZID LUTFI BIN AHMAD LUTFI|3180.05|3022.30|0.00|157.75| This text files can manually convert to excel files.But, I wanna ask, is there any script that I can use to convert .txt files to .xls files ? Hi all,now I'm already can convert text files to excell file by python using script that was given from user named Rami Helmy.A big thanks for him.But now,That script will produce more than one excell files depends on the number of '|' from the text files.Beside that,That script also can only convert one text files.I a going to convert all text files without state the name of text files.Therefore,I am looking such a way on how to this script going to: output only one excell file convert all .txt files from the directory that was given from user. output excell's file name are automaticly copied from the file name of text files. I am new in python,hopefully someone can help me to solve my problems.Thank You.. done all the task,but there was something that I'm confused.. that output excell files contains an "square" symbol like this: then, how can I ensure that there is no square symbol like that after I convert from text files to excell? thank you...

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >