Skip to main content

HCell SDK Engine and Features

HCell SDK Basic Functions

HCell SDK Basic Functions covers core SDK functionality including initialization, file loading and saving through the file system, path creation, and registration and removal of custom procedures.

It includes APIs that consider various integration scenarios, providing flexible developer-centric control.

FunctionAPIDescriptionExample
HCell SDK InitializationSDK.InitializeFunction to load and initialize the HCell SDK enginesdk.Initialize();
Get HCell SDK InstanceSDK.GetInstanceFunction that returns the HCell SDK instanceconst instance = sdk.GetInstance();
HCell SDK ReleaseSDK.FinalizeFunction to unload the HCell SDK enginesdk.Finalize();
Read File from HCell SDK File SystemSDK.ReadFileFunction that reads a file stored in the HCell SDK file system and returns it as a byte arraylet buffer = sdk.ReadFile("/hnc/File/example.xlsx");
Save File to HCell SDK File SystemSDK.WriteFileFunction that saves a byte array as a file in the HCell SDK file systemsdk.WriteFile("/hnc/File/example.xlsx", buffer);
Rename File or Path in HCell SDK File SystemSDK.RenameFileFunction that renames a file or path in the HCell SDK file systemsdk.RenameFile("/hnc/File/old.xlsx", "/hnc/File/new.xlsx");
Remove File or Path from HCell SDK File SystemSDK.RemoveFileFunction that removes a file or path from the HCell SDK file systemsdk.RemoveFile("/hnc/File/example.xlsx");
Check if File or Path Exists in HCell SDK File SystemSDK.ContainsFileFunction that checks if a file or path exists in the HCell SDK file systemif (sdk.ContainsFile("/hnc/File/example.xlsx")) {
}
Create Directory in HCell SDK File SystemSDK.CreateDirectoryFunction that creates a directory in the HCell SDK file systemsdk.CreateDirectory("/hnc/Example");
Check HCell SDK File SystemSDK.ShowFileSystemFunction that outputs the HCell SDK file system status to console in object formatsdk.ShowFileSystem();
Add Visual Basic Procedure (Macro Recording)SDK.AddVBProcedureFunction that adds a Visual Basic procedure in macro formsdk.AddVBProcedure(`
Sub Example()
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 2
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
End With

Columns("A:H").ColumnWidth = 12
With Range("A1:H47").Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ThemeColor = 1
End With
With Range("A1:H47").Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ThemeColor = 1
End With
End Sub
`);
Remove Visual Basic Procedure (Macro Removal)SDK.DeleteVBProcedureFunction that removes a Visual Basic proceduresdk.DeleteVBProcedure("Example");
Execute Visual Basic Procedure (Macro Execution)SDK.ExecuteVBProcedureFunction that executes a Visual Basic proceduresdk.ExecuteVBProcedure("Example");
Execute Visual Basic ScriptSDK.ExecuteVBScriptFunction that executes a Visual Basic scriptsdk.ExecuteVBScript(`
Cells.Clear
ActiveSheet.Shapes.SelectAll
Selection.Delete
`);