Sponsored Content
Top Forums Shell Programming and Scripting Writing excel file using perl : Excel file formatting changed Post 302793551 by Corona688 on Friday 12th of April 2013 01:43:22 PM
Old 04-12-2013
And that is why.

Win32::OLE only works on windows AFAIK.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Formatting excel file

Hi, I have a problem in formatting the excel file from my script. Assume that there is a text file generated using a 'C shell Unix script' with a format similar to the one seen below. Each column has a fixed length and every row is going to have a value against a column depending on the... (1 Reply)
Discussion started by: subra
1 Replies

2. Shell Programming and Scripting

PERL: Split Excel Workbook to Indiv Excel files

Hi, I am trying to find a way to read an excel work book with multiple worksheets. And write each worksheet into a new excel file using perl. My environment is Unix. For example: I have an excel workbook TEST.xls and it has Sheet1, Sheet2, Sheet3 worksheets. I would like to create... (2 Replies)
Discussion started by: sandeep78
2 Replies

3. Shell Programming and Scripting

PERL: Modify Excel cell formatting

Hi, I would like to modify an existing excel cell format to a custom format. Is there a way to do it with out writing into a new excel file. In-place editing? Thanks (0 Replies)
Discussion started by: sandeep78
0 Replies

4. Shell Programming and Scripting

creating excel file using perl

Hi , I am writing a simple excel file and want to create the file under say 'D:\Documents and Settings'. The problem with my code is it is writing in the same directory instead of the specified. Here is a sample code use Spreadsheet::WriteExcel; my $workbook =... (1 Reply)
Discussion started by: daptal
1 Replies

5. Shell Programming and Scripting

perl : date from excel(.xlsx) not printed properly(format is changed)

I am trying to convert xlsx sheet to a csv file. In .xlsx file there a cell with date Mon 08/27/12 while reading this cell using Spreadsheet::XLSX, the output is display with numeric value i.e., 41148. from Spreadsheet::XLSX module : use Text::Iconv; my $converter =... (1 Reply)
Discussion started by: giridhar276
1 Replies

6. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

All, I have an excel sheet Excel1.xls that has some entries. I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls These may be in different workbooks. They are totally independent made by 2 different users. I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies

7. Shell Programming and Scripting

Data formatting in CSV file to EXCEL

Hello friends I want to convert an csv file on unix (which is generated by a ETL application) to a formatted excel sheet like .I have roughly like 28 columns 1)All numbers need to be stored as numbers with leading zeros-like format as text for this column to preserve leading zeroes e.g... (6 Replies)
Discussion started by: etldev
6 Replies

8. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

9. Shell Programming and Scripting

Writing xml from excel sheet .xls using perl script

Hi all. I am working on the below requirement of generating .xml file from .xls file which i have , can someone please help me or in writing the perl script for the same: The xls file format is as below which has two columns and number of rows are not fixed: Fixlet Name ... (12 Replies)
Discussion started by: omkar.jadhav
12 Replies

10. Shell Programming and Scripting

Formatting data to put it in the excel file

Hello, I have a file with the below contents : Policy Name: Backup_bkp Policy Type: Catalog_bkp Active: yes Effective date: 08/07/2013 02:02:12 Mult. Data Streams: no Client Encrypt: no Checkpoint: no Policy Priority: ... (11 Replies)
Discussion started by: rahul2662
11 Replies
OLE::Storage_Lite(3pm)					User Contributed Perl Documentation				    OLE::Storage_Lite(3pm)

NAME
OLE::Storage_Lite - Simple Class for OLE document interface. SYNOPSIS
use OLE::Storage_Lite; # Initialize. # From a file my $oOl = OLE::Storage_Lite->new("some.xls"); # From a filehandle object use IO::File; my $oIo = new IO::File; $oIo->open("<iofile.xls"); binmode($oIo); my $oOl = OLE::Storage_Lite->new($oFile); # Read data my $oPps = $oOl->getPpsTree(1); # Save Data # To a File $oPps->save("kaba.xls"); #kaba.xls $oPps->save('-'); #STDOUT # To a filehandle object my $oIo = new IO::File; $oIo->open(">iofile.xls"); bimode($oIo); $oPps->save($oIo); DESCRIPTION
OLE::Storage_Lite allows you to read and write an OLE structured file. OLE::Storage_Lite::PPS is a class representing PPS. OLE::Storage_Lite::PPS::Root, OLE::Storage_Lite::PPS::File and OLE::Storage_Lite::PPS::Dir are subclasses of OLE::Storage_Lite::PPS. new() Constructor. $oOle = OLE::Storage_Lite->new($sFile); Creates a OLE::Storage_Lite object for $sFile. $sFile must be a correct file name. The "new()" constructor also accepts a valid filehandle. Remember to "binmode()" the filehandle first. getPpsTree() $oPpsRoot = $oOle->getPpsTree([$bData]); Returns PPS as an OLE::Storage_Lite::PPS::Root object. Other PPS objects will be included as its children. If $bData is true, the objects will have data in the file. getPpsSearch() $oPpsRoot = $oOle->getPpsTree($raName [, $bData][, $iCase] ); Returns PPSs as OLE::Storage_Lite::PPS objects that has the name specified in $raName array. If $bData is true, the objects will have data in the file. If $iCase is true, search is case insensitive. getNthPps() $oPpsRoot = $oOle->getNthPps($iNth [, $bData]); Returns PPS as "OLE::Storage_Lite::PPS" object specified number $iNth. If $bData is true, the objects will have data in the file. Asc2Ucs() $sUcs2 = OLE::Storage_Lite::Asc2Ucs($sAsc>); Utility function. Just adds 0x00 after every characters in $sAsc. Ucs2Asc() $sAsc = OLE::Storage_Lite::Ucs2Asc($sUcs2); Utility function. Just deletes 0x00 after words in $sUcs. OLE
::Storage_Lite::PPS OLE::Storage_Lite::PPS has these properties: No Order number in saving. Name Its name in UCS2 (a.k.a Unicode). Type Its type (1:Dir, 2:File (Data), 5: Root) PrevPps Previous pps (as No) NextPps Next pps (as No) DirPps Dir pps (as No). Time1st Timestamp 1st in array ref as similar fomat of localtime. Time2nd Timestamp 2nd in array ref as similar fomat of localtime. StartBlock Start block number Size Size of the pps Data Its data Child Its child PPSs in array ref OLE
::Storage_Lite::PPS::Root OLE::Storage_Lite::PPS::Root has 2 methods. new() $oRoot = OLE::Storage_Lite::PPS::Root->new( $raTime1st, $raTime2nd, $raChild); Constructor. $raTime1st, $raTime2nd are array refs with ($iSec, $iMin, $iHour, $iDay, $iMon, $iYear). $iSec means seconds, $iMin means minutes. $iHour means hours. $iDay means day. $iMon is month -1. $iYear is year - 1900. $raChild is a array ref of children PPSs. save() $oRoot = $oRoot>->save( $sFile, $bNoAs); Saves information into $sFile. If $sFile is '-', this will use STDOUT. The "new()" constructor also accepts a valid filehandle. Remember to "binmode()" the filehandle first. If $bNoAs is defined, this function will use the No of PPSs for saving order. If $bNoAs is undefined, this will calculate PPS saving order. OLE
::Storage_Lite::PPS::Dir OLE::Storage_Lite::PPS::Dir has 1 method. new() $oRoot = OLE::Storage_Lite::PPS::Dir->new( $sName, [, $raTime1st] [, $raTime2nd] [, $raChild>]); Constructor. $sName is a name of the PPS. $raTime1st, $raTime2nd is a array ref as ($iSec, $iMin, $iHour, $iDay, $iMon, $iYear). $iSec means seconds, $iMin means minutes. $iHour means hours. $iDay means day. $iMon is month -1. $iYear is year - 1900. $raChild is a array ref of children PPSs. OLE
::Storage_Lite::PPS::File OLE::Storage_Lite::PPS::File has 3 method. new $oRoot = OLE::Storage_Lite::PPS::File->new($sName, $sData); $sName is name of the PPS. $sData is data of the PPS. newFile() $oRoot = OLE::Storage_Lite::PPS::File->newFile($sName, $sFile); This function makes to use file handle for geting and storing data. $sName is name of the PPS. If $sFile is scalar, it assumes that is a filename. If $sFile is an IO::Handle object, it uses that specified handle. If $sFile is undef or '', it uses temporary file. CAUTION: Take care $sFile will be updated by "append" method. So if you want to use IO::Handle and append a data to it, you should open the handle with "r+". append() $oRoot = $oPps->append($sData); appends specified data to that PPS. $sData is appending data for that PPS. CAUTION
A saved file with VBA (a.k.a Macros) by this module will not work correctly. However modules can get the same information from the file, the file occurs a error in application(Word, Excel ...). DEPRECATED FEATURES
Older version of "OLE::Storage_Lite" autovivified a scalar ref in the "new()" constructors into a scalar filehandle. This functionality is still there for backwards compatibility but it is highly recommended that you do not use it. Instead create a filehandle (scalar or otherwise) and pass that in. COPYRIGHT
The OLE::Storage_Lite module is Copyright (c) 2000,2001 Kawai Takanori. Japan. All rights reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. ACKNOWLEDGEMENTS
First of all, I would like to acknowledge to Martin Schwartz and his module OLE::Storage. AUTHOR
Kawai Takanori kwitknr@cpan.org This module is currently maintained by John McNamara jmcnamara@cpan.org SEE ALSO
OLE::Storage Documentation for the OLE Compound document has been released by Microsoft under the Open Specification Promise. See http://www.microsoft.com/interop/docs/supportingtechnologies.mspx The Digital Imaging Group have also detailed the OLE format in the JPEG2000 specification: see Appendix A of http://www.i3a.org/pdf/wg1n1017.pdf perl v5.10.1 2009-11-24 OLE::Storage_Lite(3pm)
All times are GMT -4. The time now is 06:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy