EDAboard.com | EDAboard.de | EDAboard.co.uk | WTWH Media

Skill, Microsoft Excel, and a .csv file?

Ask a question - edaboard.com

elektroda.net NewsGroups Forum Index - Cadence - Skill, Microsoft Excel, and a .csv file?


Guest

Fri Feb 22, 2008 6:42 pm   



I would like to write a skill code that accesses a Microsoft Excel
file and saves that information aside as a .csv file. Is this
possible?

Sincerely,
Brian J. Reed
IBM Systems &Technology Group, Development
Circuit Design Engineer

DReynolds
Guest

Mon Feb 25, 2008 8:42 pm   



Brian, I would think the easiest way is to dump csv from excel, modify
it with skill, then import it back to excel

David



On Feb 22, 12:25 pm, brian.j.r...@gmail.com wrote:
Quote:
I would like to write a skill code that accesses a Microsoft Excel
file and saves that information aside as a .csv file. Is this
possible?

Sincerely,
Brian J. Reed
IBM Systems &Technology Group, Development
Circuit Design Engineer


Riad KACED
Guest

Sun Mar 02, 2008 3:40 pm   



Hi Brian,

I have no knowledge of any skill function that reads excel file ...
I know however that other languages like Perl and Python (and most
likely others but I have no experience) support libraries and classes
to read from / write to MS Excel files.

I know also that skill handles a set of functions that allows you
executing unix commands/scripts from your skill functions. such
functions are system("yourUnixCommand"), sh("yourUnixCommand"),
csh("yourUnixCommand") ... The output of these functions however is
directed to unix window where they have been called.

I guess you are not just interested in generating the csv file but
interested also in post processing the data in your skill function. So
if you want your skill procedure to get these data, the best for you
is to use the Interprocess Communication (IPC) SKILL functions. They
allow you to create and communicate with child processes. You can find
more information about the ipc functions in the Cadence
documentation :
<CADENCE_INSTALL_DIR>/doc/skipcref/skipcref.pdf

An example of using IPC SKILL functions is :
; This piece of code gets the hostname

cidHost = ipcBeginProcess("uname -n")
ipcWait(cidHost)
ridHost=car(parseString(ipcReadProcess(cidHost) "\n"))

Well, the solution I'm proposing is then :
1. Write a perl/python/OTHER script that dumps the MS Excel file into
csv
2. Call this script from skill using the above described functions
depending on what you want to do. You have then to post process the
output data with your skill procedure.

For your information :
1. Perl supports the following libraries to deal with MS Excel file :
+ Spreadsheet::WriteExcel -->
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.20/lib/Spreadsheet/WriteExcel.pm
+ Spreadsheet::ParseExcel
http://search.cpan.org/~szabgab/Spreadsheet-ParseExcel-0.32/lib/Spreadsheet/ParseExcel.pm
+ ...

2. Python supports the following libraries to deal with MS Excel
file :
+ pyExcelerator --> http://pypi.python.org/pypi/pyExcelerator/0.6.0a
+ pyXLWriter --> http://pypi.python.org/pypi/pyXLWriter/0.4a2
+ xlrd --> http://pypi.python.org/pypi/xlrd/0.6.1
+ ...

I'm actually lacking experience with Cadence IC 6 and I'm just
wondering if there is a better way to handle this with the new
framework/database. I think nobody has better knowledge of this area
than Andrew does.

Good luck !

Riad.

Andrew Beckett
Guest

Mon Mar 03, 2008 5:41 pm   



Riad KACED wrote, on 03/02/08 14:26:
Quote:
Hi Brian,

I have no knowledge of any skill function that reads excel file ...
I know however that other languages like Perl and Python (and most
likely others but I have no experience) support libraries and classes
to read from / write to MS Excel files.

I know also that skill handles a set of functions that allows you
executing unix commands/scripts from your skill functions. such
functions are system("yourUnixCommand"), sh("yourUnixCommand"),
csh("yourUnixCommand") ... The output of these functions however is
directed to unix window where they have been called.

I guess you are not just interested in generating the csv file but
interested also in post processing the data in your skill function. So
if you want your skill procedure to get these data, the best for you
is to use the Interprocess Communication (IPC) SKILL functions. They
allow you to create and communicate with child processes. You can find
more information about the ipc functions in the Cadence
documentation :
CADENCE_INSTALL_DIR>/doc/skipcref/skipcref.pdf

An example of using IPC SKILL functions is :
; This piece of code gets the hostname

cidHost = ipcBeginProcess("uname -n")
ipcWait(cidHost)
ridHost=car(parseString(ipcReadProcess(cidHost) "\n"))

Well, the solution I'm proposing is then :
1. Write a perl/python/OTHER script that dumps the MS Excel file into
csv
2. Call this script from skill using the above described functions
depending on what you want to do. You have then to post process the
output data with your skill procedure.

For your information :
1. Perl supports the following libraries to deal with MS Excel file :
+ Spreadsheet::WriteExcel --
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.20/lib/Spreadsheet/WriteExcel.pm
+ Spreadsheet::ParseExcel
http://search.cpan.org/~szabgab/Spreadsheet-ParseExcel-0.32/lib/Spreadsheet/ParseExcel.pm
+ ...

2. Python supports the following libraries to deal with MS Excel
file :
+ pyExcelerator --> http://pypi.python.org/pypi/pyExcelerator/0.6.0a
+ pyXLWriter --> http://pypi.python.org/pypi/pyXLWriter/0.4a2
+ xlrd --> http://pypi.python.org/pypi/xlrd/0.6.1
+ ...

I'm actually lacking experience with Cadence IC 6 and I'm just
wondering if there is a better way to handle this with the new
framework/database. I think nobody has better knowledge of this area
than Andrew does.

Good luck !

Riad.

There's nothing (as far as I know) to read Excel files in IC6.X - to be honest,
you'd be better off using CSV or tab-separated files instead - as they're then
more portable.

Or XML of some sort.

If you write out a tab-separated file with a suffix ".xls", Excel will read it
directly in Windows...

Regards,

Andrew.


Guest

Sat Jun 01, 2019 7:45 pm   



i need skill and course in CVS format

elektroda.net NewsGroups Forum Index - Cadence - Skill, Microsoft Excel, and a .csv file?

Ask a question - edaboard.com

Arabic version Bulgarian version Catalan version Czech version Danish version German version Greek version English version Spanish version Finnish version French version Hindi version Croatian version Indonesian version Italian version Hebrew version Japanese version Korean version Lithuanian version Latvian version Dutch version Norwegian version Polish version Portuguese version Romanian version Russian version Slovak version Slovenian version Serbian version Swedish version Tagalog version Ukrainian version Vietnamese version Chinese version Turkish version
EDAboard.com map