UtilityLibraryClasses
PropertyInputArrayFormatAsmwArrayFormat. Thispropertyoftype
mwArrayFormat
controlstheformattingofarrayspassedasinputparameters
toExcelBuilderclassmethods.Thedefaultvalueis
mwArrayFormatMatrix
.
Thebehaviorsindicatedbythisflagarelistedinthefollowingtable.
ArrayFormattingRulesforInputArrays
Value
Behavior
mwArrayFormatAsIs
Convertsarraysaccordingtothe
defaultconversionruleslistedin
“DataConversionRules”onpage
B-2.
mwArrayFormatCell
Coercesallarraysintocellarrays.
Inputscalarornumericarray
argumentsareconvertedtocell
arrayswitheachcellcontaininga
scalarvaluefortherespectiveindex.
mwArrayFormatMatrix
Coercesallarraysintomatrices.
When an inputargumentis
encounteredthatisanarrayof
Variant
s(thedefaultbehavioris
toconvertittoacellarray),the
dataconverterconvertsthisarray
toamatrixif each
Variant
is
singlevalued,andallelementsare
homogeneousandofanumerictype.
Ifthisconversionisnotpossible,
createsacellarray.
PropertyInputArrayIndFlagAsLong. Thispropertygovernsthelevelat
whichtoapplytherulesetbythe
InputArrayFormat
propertyfornested
arrays(anarrayof
Variant
sispassedandeachelementofthearrayisan
arrayitself).Itisnotnecessarytomodifythisflagfor
varargin
parameters.
Thedataconversioncodeautomaticallyincrementsthevalueofthisflagby
1for
varargin
cells,thusapplyingthe
InputArrayFormat
flagtoeachcell
ofa
varargin
parameter.Thedefaultvalueis
0
.
C-11
Add pdf files together - Merge, append PDF files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provide C# Demo Codes for Merging and Appending PDF Document
pdf combine two pages into one; pdf combine
Add pdf files together - VB.NET PDF File Merge Library: Merge, append PDF files in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET Guide and Sample Codes to Merge PDF Documents in .NET Project
best pdf combiner; pdf split and merge
C
Utility Library
PropertyOutputArrayFormatAsmwArrayFormat.Thispropertyoftype
mwArrayFormat
controlstheformattingofarrayspassedasoutputparameters
toExcelBuilderclassmethods.Thedefaultvalueis
mwArrayFormatAsIs
.The
behaviorsindicatedbythisflagarelistedinthefollowingtable.
ArrayFormattingRulesforOutputArrays
Value
Behavior
mwArrayFormatAsIs
Convertsarraysaccordingtothe
defaultconversionrules listed
inMATLABtoCOMVARIANT
ConversionRulesonpageB-5.
mwArrayFormatMatrix
Coercesallarraysintomatrices.
Whenanoutputcellarrayargument
isencountered(thedefaultbehavior
convertsittoanarrayof
Variant
s),
thedataconverterconvertsthis
arraytoa
Variant
thatcontainsa
simplenumericarrayifeachcellis
singlevalued,andallelementsare
homogeneousandofanumerictype.
Ifthisconversionisnotpossible,an
arrayof
Variant
siscreated.
mwArrayFormatCell
Coercesalloutput arraysinto
arraysof
Variant
s. Outputscalar
ornumericarrayargumentsare
convertedtoarraysof
Variant
s,
each
Variant
containingascalar
valuefortherespectiveindex.
PropertyOutputArrayIndFlagAsLong. Thispropertyissimilartothe
InputArrayIndFalg
property,asitgovernsthelevelatwhichtoapplythe
rulesetbythe
OutputArrayFormat
propertyfornestedarrays. Aswith
theinputcase,thisflagisautomaticallyincrementedby1fora
varargout
parameter. Thedefaultvalueofthisflagis
0
.
C-12
C# Word - Merge Word Documents in C#.NET
empowers C# programmers to easily merge and append Word files with mature input Word documents can be merged and appended together according to Add references:
pdf merge documents; add pdf together one file
C# PowerPoint - Merge PowerPoint Documents in C#.NET
together according to its loading sequence, and then saved and output as a single PowerPoint with user-defined location. C# DLLs: Merge PowerPoint Files. Add
pdf mail merge; append pdf
UtilityLibraryClasses
PropertyAutoResizeOutputAsBoolean. ThisflagappliestoExcelranges
only.WhenthetargetoutputfromamethodcallisarangeofcellsinanExcel
worksheet,andtheoutputarraysizeandshapeisnotknownatthetimeofthe
call,settingthisflagto
True
instructsthedataconversioncodetoresizeeach
Excelrangetofittheoutputarray.Resizingisappliedrelativetotheupper
leftcornerofeachsuppliedrange.Thedefaultvalueforthisflagis
False
.
Property TransposeOutputAsBoolean. Settingthisflagto
True
transposestheoutputarguments.Thisflagisusefulwhenprocessingan
outputparameterfromamethodcallonanExcelBuildercomponent,where
theMATLABfunctionreturnsoutputsasrowvectors,andyoudesiretoplace
thedataintocolumns.Thedefaultvalueforthisflagis
False
.
PropertyDataConversionFlagsAsMWDataConversionFlags
The
DataConversionFlags
propertycontrolshowinputvariablesare
processedwhentypecoercionisneeded.The
MWDataConversionFlags
class
isanoncreatableclassaccessedthroughan
MWFlags
classinstance. This
classcontainstheseproperties:
• “PropertyCoerceNumericToTypeAsmwDataType”onpageC-13
• “PropertyInputDateFormatAsmwDateFormat”onpageC-13
• “PropertyOutputAsDateAsBoolean”onpageC-15
• “PropertyDateBiasAsLong”onpageC-15
Property CoerceNumericToType AsmwDataType. Thisproperty
convertsallnumericinputargumentstoonespecificMATLABtype. This
flagisusefuliswhenvariablesmaintainedwithintheVisualBasiccode
aredifferenttypes,e.g.,
Long
,
Integer
,etc.,andallvariablespassedto
thecompiledMATLABcodemustbedoubles. Thedefaultvalueforthis
propertyis
mwTypeDefault
,whichusesthedefaultrulesinCOMVARIANTto
MATLABConversionRulesonpageB-10.
PropertyInputDateFormatAsmwDateFormat. Thispropertyconverts
datespassedasinputparameterstomethodcallsonExcelBuilderclasses.
Thedefaultvalueis
mwDateFormatNumeric
.Thebehaviorsindicatedbythis
flagareshowninthefollowingtable.
C-13
C# PDF Convert to Text SDK: Convert PDF to txt files in C#.net
can be copied and pasted to .txt files by keeping text by a method loses the original PDF document layout and all the paragraphs are joining together, our C#
build pdf from multiple files; batch pdf merger online
VB.NET Word: How to Process MS Word in VB.NET Library in .NET
Imaging.MSWordDocx.dll", which, when used together with other online tutorial on how to add & insert controls, PDF document, image to pdf files and components
reader create pdf multiple files; attach pdf to mail merge in word
C
Utility Library
ConversionRulesforInputDates
Value
Behavior
mwDateFormatNumeric
Convertdatestonumericvaluesas
indicatedbytherulelistedinCOM
VARIANTtoMATLABConversion
RulesonpageB-10.
mwDateFormatString
Convertinputdatestostrings.
Example. Thisexampleusesdataconversionflagstoreshapetheoutput
fromamethodcompiledfromaMATLABfunctionthatproducesanoutput
vectorofunknownlength:
function p = myprimes(n)
if length(n)~=1, error('N must t be e a a scalar'); ; end
if n n < < 2, , p p = zeros(1,0); return, end
p = = 1:2:n;
q = = length(p);
p(1) = = 2;
for k = 3:2:sqrt(n)
if p((k+1)/2)
p(((k*k+1)/2):k:q) = 0;
end
end
p = = (p(p>0));
Thisfunctionproducesarowvectorofalltheprimenumbersfrom0to
n
.
Assumethatthisfunctionisincludedinaclassnamed
myclass
thatis
includedinacomponentnamed
mycomponent
withaversionof1.0. The
subroutinetakesanExcelrangeanda
Double
asinputs,andplacesthe
generatedprimenumbersintothesuppliedrange.TheMATLABfunction
producesarowvector,althoughyouwanttheoutputincolumnformat.Italso
producesanunknownnumberofoutputs,andyoudonotwanttotruncate
anyoutput.
Tohandletheseissues,setthe
TransposeOutput
flagandthe
AutoResizeOutput
flagto
True
. Inpreviousexamples,theVisualBasic
CreateObject
functioncreatesthenecessaryclasses.Thisexampleusesan
C-14
C# Excel - Merge Excel Documents in C#.NET
and appended together according to its loading sequence, and then saved and output as a single Excel with user-defined location. C# DLLs: Merge Excel Files. Add
scan multiple pages into one pdf; c# combine pdf
C# TIFF: TIFF Editor SDK to Read & Manipulate TIFF File Using C#.
Support converting other files to Tiff, like Word, Excel, PowerPoint, PDF, and images. Enable to add XImage.OCR for .NET into C# Tiff imaging application
batch combine pdf; pdf combine files online
UtilityLibraryClasses
explicittypedeclarationforthe
aClass
variable.Aswithpreviousexamples,
thisfunctionassumesthat
MWInitApplication
hasbeenpreviouslycalled.
Sub GenPrimes(R As Range, n n As Double)
Dim aClass s As mycomponent.myclass
On Error GoTo o Handle_Error
Set aClass s = = New mycomponent.myclass
aClass.MWFlags.ArrayFormatFlags.AutoResizeOutput = True
aClass.MWFlags.ArrayFormatFlags.TransposeOutput = = True
Call aClass.myprimes(1, , R, n)
Exit Sub
Handle_Error:
MsgBox (Err.Description)
End Sub
PropertyOutputAsDateAsBoolean. Thispropertyprocessesanoutput
argumentasadate.Bydefault,numericdatesthatareoutputparameters
fromcompiledMATLABfunctionsarepassedas
Double
sthatneedtobe
decrementedbytheCOMdatebias(693960)aswellascoercedtoCOMdates.
Setthisflagto
True
toconvertalloutputvaluesoftype
Double
.
PropertyDateBiasAsLong. Thispropertysetsthedatebiasforperforming
COMtoMATLABnumericdateconversions. Thedefaultvalueofthis
propertyis693960,representingthedifferencebetweentheCOM
Date
type
andMATLABnumericdates. ThisflagallowsexistingMATLABcodethat
alreadyperformstheincrementofnumericdatesby693960tobeused
unchangedwithExcelBuildercomponents.Toprocessdateswithsuchcode,
setthispropertyto
0
.
SubClone(ppFlagsAs MWFlags)
Createsacopyofan
MWFlags
object.
C-15
C# Image: C# Code to Encode & Decode JBIG2 Images in RasterEdge .
Easy to add C# JBIG2 codec controls to your image and codec into PDF documents for a better PDF compression; text to the new project folder, together with .NET
add pdf files together; batch merge pdf
VB.NET PDF Text Search Library: search text inside PDF file in vb.
and find text content in multiple page adobe PDF files in .NET Our VB.NET PDF Document Add-On enables you to search for text in target PDF document by using
pdf merge comments; pdf merge files
C
Utility Library
Parameters.
Argument
Type
Description
ppFlags
MWFlags
Reference to an
uninitialized
MWFlags
objectthatreceivesthe
copy
Return Value. None
Remarks. Cloneallocatesanew
MWFlags
objectandcreatesadeepcopyof
theobject’scontents. Callthisfunctionwhenaseparateobjectisrequired
insteadofasharedcopyofanexistingobjectreference.
ClassMWStruct
The
MWStruct
classpassesorreceivesa
Struct
typetoorfromacompiled
classmethod.Thisclasscontainstheseproperties/methods:
• “SubInitialize([varDims],[varFieldNames])”onpageC-16
• “PropertyItem([i0],[i1],...,[i31])AsMWField”onpageC-18
• “PropertyNumberOfFieldsAsLong”onpageC-21
• “PropertyNumberOfDimsAsLong”onpageC-21
• “PropertyDimsAsVariant”onpageC-21
• “PropertyFieldNamesAsVariant”onpageC-21
• “SubClone(ppStructAsMWStruct)”onpageC-22
SubInitialize([varDims],[varFieldNames])
Allocatesastructurearraywithaspecifiednumberandsizeofdimensions
andaspecifiedlistoffieldnames.
C-16
UtilityLibraryClasses
Parameters.
Argument
Type
Description
varDims
Variant
Optional array of
dimensions
varFieldNames
Variant
Optionalarrayoffield
names
Return Value. None.
Remarks. Whencreated,an
MWStruct
objecthasadimensionalityof1-by-1
andnofields.The
Initialize
methoddimensionsthearrayandaddsasetof
namedfieldstoeachelement. Eachtimeyoucall
Initialize
onthesame
object,itisredimensioned. Ifyoudonotsupplythe
varDims
argument,the
existingnumberandsizeofthearray’sdimensionsunchanged.Ifyoudonot
supplythe
varFieldNames
argument,theexistinglistoffieldsisnotchanged.
Calling
Initialize
withnoargumentsleavesthearrayunchanged.
Example. ThefollowingVisualBasiccodeillustratesuseofthe
Initialize
methodtodimensionstructarrays:
Sub foo ()
Dim x x As s MWStruct
Dim y y As s MWStruct
On Error Goto o Handle_Error
'Create 1X1 struct t arrays s with no fields for x, , and d y
Set x x = = new MWStruct
Set y y = = new MWStruct
'Initialize x x to o be 2X2 2 with h fields "red", "green", and d "blue"
Call x.Initialize(Array(2,2), Array("red", , "green", , "blue"))
'Initialize y y to o be 1X5 5 with h fields "name" and "age"
Call y.Initialize(5, Array("name", , "age"))
'Re-dimension x x to o be e 3X3 with the e same field d names
Call x.Initialize(Array(3,3))
'Add a new w field d to y
C-17
C
Utility Library
Call y.Initialize(, Array("name", "age", "salary"))
Exit Sub
Handle_Error:
MsgBox(Err.Description)
End Sub
PropertyItem([i0],[i1],...,[i31])AsMWField
The
Item
propertyisthedefaultpropertyofthe
MWStruct
class.Thisproperty
isusedtosetandgetthevalueofafieldataparticularindexinthestructure
array.
Parameters.
Argument
Type
Description
i0
,
i1
,...,
i31
Variant
Optional index
arguments. 0to32
indexargumentscanbe
entered. Toreference
anelementofthearray,
specifyallindexesas
wellasthefieldname.
Remarks. Whenaccessinganamedfieldthroughthisproperty,youmust
supplyalldimensionsoftherequestedfieldaswellasthefieldname. This
propertyalwaysreturnsasinglefieldvalue,andgeneratesabadindexerror
ifyouprovideaninvalidorincompleteindexlist. Indexargumentshave
fourbasicformats:
C-18
UtilityLibraryClasses
Fieldnameonly
Thisformatmaybeusedonlyinthecaseofa
1-by-1structurearrayandreturnsthenamed
field’svalue. Forexample:
x("red") = = 0.2
x("green") = 0.4
x("blue") = 0.6
Inthisexample,thenameof the
Item
propertywasneglected.Thisispossiblesince
the
Item
propertyisthedefaultproperty
ofthe
MWStruct
class. Inthiscasethetwo
statementsareequivalent:
x.Item("red") = = 0.2
x("red") = = 0.2
Singleindexandfieldname Thisformataccessesarrayelements
throughasinglesubscriptingnotation. A
singlenumericindex
n
followedbythe
fieldnamereturnsthenamedfieldon
the
n
tharrayelement,navigatingthe
arraylinearlyincolumn-majororder.
Forexample,considera 2-by-2arrayof
structureswithfields
"red"
,
"green"
,and
"blue"
storedinavariable
x
. Thesetwo
statementsareequivalent:
y = x(2, "red")
y = x(2, 1, "red")
C-19
C
Utility Library
Allindicesandfieldname
Thisformataccessesanarrayelementof
amultidimensionalarraybyspecifying
n
indices.Thesestatementsaccessallfourof
theelementsofthearrayintheprevious
example:
For I I From 1 1 To 2
For J J From 1 To 2
r(I, J) = = x(I, J, "red")
g(I, J) = = x(I, J, "green")
b(I, J) = = x(I, J, "blue")
Next
Next
Arrayofindicesandfield
name
Thisformataccessesanarrayelementby
passinganarrayofindicesandafieldname.
Thefollowingexamplerewritestheprevious
exampleusinganindexarray:
Dim Index(1 To 2) As Integer
For I I From 1 1 To 2
Index(1) = = I
For J J From 1 To 2
Index(2) = J
r(I, J) = = x(Index, , "red")
g(I, J) = = x(Index, , "green")
b(I, J) = = x(Index, , "blue")
Next
Next
Withthesefourformats,the
Item
propertyprovidesaveryflexibleindexing
mechanismforstructurearrays. Alsonote:
• Youcancombinethelasttwoindexingformats.Severalindexarguments
suppliedineitherscalarorarrayformatareconcatenatedtoformone
indexset.Thecombiningstopswhenthenumberofdimensionshasbeen
reached. Forexample:
C-20
Documents you may be interested
Documents you may be interested