XEROF

 

xlsgen 5.0.0.18 : PowerShell scripting


Build 5.0.0.18 of xlsgen adds support for running Windows PowerShell scripts.

Windows PowerShell is part of Windows and is more security-aware than other scripting languages such as VBScript and JScript. Since it can create and run COM object instances, and expose the object model to the client application, it is important to make it available to everyone in the context of xlsgen applications. Windows PowerShell scripts are .ps1 files.

And PowerShell is one of the available programming language targets available in the automatic source code generation tool that comes with the xlsgen install so you can get going in a snap.



Build 5.0.0.18 comes with a code sample (/samples/PowerShell) that creates a simple worksheet. A copy of it is below.

Note that the xlsgen object model has constants (enumerated types) that PowerShell does not expose after reading the xlsgen type-library so we are making available, also in code samples, a file called xlsgen.ps1 that exposes all constants available from the object model.

Below is a code sample using PowerShell :


# Produced by xlsgen code generator (c) ARsT design.
# For more info, see http://xlsgen.arstdesign.com
#
# To use this code in your PowerShell script editor, remember to add the
# xlsgen constant-library with the following statement :
# .samples/PowerShell/xlsgen.ps1
#
# In order to import the .ps1 script, make sure to run PowerShell as admin and
# set the appropriate execution policy as in :
# Set-ExecutionPolicy RemoteSigned
# which allows to run the .ps1 script within a console
#

$engine = new-object -ComObject ExcelGenerator.ARsTDesign
$workbook = $engine.New( "C:\tmp\myfile.xlsx" )

$wksht001 = $workbook.AddWorksheet( "Sheet1" )

$wksht001.Cell(1,2).HtmlFloat = "<font color=#000000 size=11 name=""Calibri"">154</font>"
$wksht001.Cell(1,3).HtmlLabel = "<font color=#000000 size=11 name=""Calibri"">this is a test</font>"
$wksht001.Cell(3,3).HtmlFloat = "<font color=#000000 size=11 name=""Calibri"">1</font>"
$wksht001.Cell(4,3).HtmlFloat = "<font color=#000000 size=11 name=""Calibri"">2</font>"

$workbook.Close()


Posted on 13-October-2023 19:00 | Category: xlsgen, Excel generator | comment[0] | trackback[0]

 

 

<-- previous page

< February >
0102030405
0607080910
1112131415
1617181920
2122232425
26272829



 

 

This site
Home
Articles

DevTools
CPU-Z
EditPlus
ExplorerXP
Kill.exe
OllyDbg
DependencyWalker
Process Explorer
autoruns.exe
Araxis
COM Trace injection
CodeStats
NetBrute
FileMon/Regmon
BoundsChecker
AQTime profiler
Source monitor
GDI leaks tracking
Rootkit revealer
Rootkit removal
RunAsLimitedUser(1)
RunAsLimitedUser(2)

 

 

Liens
Le Plan B
Un jour à Paris
Meneame
Rezo.net (aggr)
Reseau voltaire
Cuba solidarity project
Le grand soir
L'autre journal
Le courrier suisse
L'Orient, le jour
Agoravox (aggr)