Click or drag to resize

UseOffice Class

The main class to convert between DOC, DOCX, XLS, XLSX, PPT, PPTX, ACCDB, CSV, RTF, Text, HTML and PDF documents with tables, images, fonts, colors, Unicode text etc.
Inheritance Hierarchy
SystemObject
  SautinSoftUseOffice

Namespace: SautinSoft
Assembly: UseOffice (in UseOffice.dll) Version: 2024.6.26
Syntax
public class UseOffice : IDisposable

The UseOffice type exposes the following members.

Constructors
 NameDescription
Public methodCode exampleUseOffice Creates an object of the UseOffice class
Top
Properties
 NameDescription
Public propertyCode exampleCreateTraceFile Forces the component to create a tracing file
Public propertyDataBasePassword Allows to specify a password to convert protected Access database
Public propertyDisableMacros Disable all macros during conversion of Word, Excel and PowerPoint documents.
Public propertyCode exampleExcelOptions Allows to specify some Excel options (sheet numbers, how to fit a sheet on page) for converting.
Public propertyExceptions Allows to get the list of all exceptions which appeared during of the conversion process.
Public propertyCode exampleOfficeVersion Gets the MS Office version.
Public propertyCode examplePageStyle Allows to specify page properties for an output PDF document: page size, orientation and page margins.
Public propertyProcessesID Gets the list with ID of all processes which were started by UseOffice .Net.
Public propertyReports Allows to set report's names which you want to export in PDF
Public propertyStatic memberCode exampleSerialObsolete.
Set activation key
Public propertyTemporaryDirectory Set a custom temporary directory for the method ConvertBytes(...).
Public propertyCode exampleTraceFilePath Path for creating a tracing file
Public propertyWritePassword Allows to specify a password for output files (*.DOCX, *.RTF)
Top
Methods
 NameDescription
Public methodCloseAccess Releases MS Access® library from memory
Public methodCode exampleCloseExcel Releases MS Excel® library from memory
Public methodCode exampleCloseOffice Releases MS Office® library (MS Word, Excel, PowerPoint) from memory
Public methodCode exampleClosePowerPoint Releases MS PowerPoint® library from memory
Public methodCode exampleCloseWord Releases MS Word® library from memory
Public methodConvertBytes Converts a document to another format in memory, see supported UseOfficeeDirection.
Public methodCode exampleConvertFile Converts a one file to a file with another format, see supported UseOfficeeDirection
Public methodDispose Releases MS Office from memory
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInitAccess Loads MS Access® library in memory
Public methodCode exampleInitExcel Loads MS Excel® library in memory
Public methodCode exampleInitOffice Loads MS Office® library (MS Word, Excel, PowerPoint) from memory
Public methodCode exampleInitPowerPoint Loads MS PowerPoint® library in memory
Public methodCode exampleInitWord Loads MS Word® library in memory
Public methodIsPasswordProtected(Byte) Detects if a given MS Office document is protected by a password or not. Supported formats: Word, Excel and PowerPoint (both legacy and OpenXml).
Public methodIsPasswordProtected(Stream) Detects if a given Ms Office document is protected by a password or not. Supported formats: Word, Excel and PowerPoint (both legacy and OpenXml).
Public methodIsPasswordProtected(String) Detects if a given Ms Office document is protected by a password or not. Supported formats: Word, Excel and PowerPoint (both legacy and OpenXml).
Public methodCode exampleKillProcesses Terminates process by its name
Public methodPrintPdf(String) Prints the PDF file using default printer
Public methodPrintPdf(String, Int32, Int32) Prints the PDF file using default printer
Public methodStatic memberCode exampleSetLicense
Activate your copy after purchasing or use temporary license for delete trial message. ATTENTION: specify this property first of all before creating the instance of UseOffice!

Use it when you got own license. We offer two license types:

Permanent license from sautinsoft.com and

Temporary license from https://sautinsoft.com/start-for-free/.

Have question? Ask us: support@sautinsoft.com.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also