uupdate 20240829
This commit is contained in:
@@ -36,6 +36,25 @@ namespace DOCGEN.Klassen
|
||||
{
|
||||
public class SynFWord
|
||||
{
|
||||
public bool create_nativ_word(string property, string value, string base64, string originalfile, string destfile)
|
||||
{
|
||||
FileStream ms = new FileStream(originalfile, FileMode.Open, FileAccess.Read);
|
||||
WordDocument document = new WordDocument();
|
||||
document.Open(ms, FormatType.Automatic);
|
||||
try {
|
||||
document.CustomDocumentProperties.Add(property, value);
|
||||
}
|
||||
catch {
|
||||
document.CustomDocumentProperties.Remove(property);
|
||||
document.CustomDocumentProperties.Add(property, value);
|
||||
|
||||
}
|
||||
document.Save(destfile);
|
||||
ms.Close();
|
||||
document.Dispose();
|
||||
return true;
|
||||
|
||||
}
|
||||
public string Generate_Word(string base64, clsDocData docdata)
|
||||
{
|
||||
|
||||
|
||||
@@ -1,12 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Syncfusion.XlsIO;
|
||||
|
||||
namespace DOCGEN.Klassen
|
||||
{
|
||||
internal class SyndFExcel
|
||||
public class SynFExcel
|
||||
{
|
||||
public bool create_nativ_excel(string property, string value, string base64, string originalfile, string destfile)
|
||||
{
|
||||
FileStream ms = new FileStream(originalfile, FileMode.Open, FileAccess.Read);
|
||||
FileStream os = new FileStream(destfile, FileMode.Create);
|
||||
ExcelEngine ex = new ExcelEngine();
|
||||
IApplication application = ex.Excel;
|
||||
IWorkbook workbook = application.Workbooks.Open(ms);
|
||||
|
||||
try
|
||||
{
|
||||
workbook.CustomDocumentProperties[property].Text = value;
|
||||
}
|
||||
catch
|
||||
{
|
||||
workbook.CustomDocumentProperties.Remove(property);
|
||||
workbook.CustomDocumentProperties[property].Text = value;
|
||||
|
||||
}
|
||||
workbook.SaveAs(os);
|
||||
workbook.Close();
|
||||
workbook = null;
|
||||
application = null;
|
||||
ms.Close();
|
||||
ms.Dispose();
|
||||
os.Close();
|
||||
os.Dispose();
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -66,8 +66,6 @@ X:\docdemo\EDOKA_2024\DOCGEN\bin\Debug\EDOKA_Barcode.dll
|
||||
X:\docdemo\EDOKA_2024\DOCGEN\bin\Debug\BarcodeStandard.dll
|
||||
X:\docdemo\EDOKA_2024\DOCGEN\bin\Debug\EDOKA_Barcode.pdb
|
||||
X:\docdemo\EDOKA_2024\DOCGEN\bin\Debug\EDOKA_Barcode.dll.config
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.AssemblyReference.cache
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.CoreCompileInputs.cache
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\libSkiaSharp.dylib
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\x86\libSkiaSharp.dll
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\x64\libSkiaSharp.dll
|
||||
@@ -121,6 +119,8 @@ E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\System.Numerics.Vectors.xml
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\System.Text.Encoding.CodePages.xml
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\Logging.pdb
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.AssemblyReference.cache
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.CoreCompileInputs.cache
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.Up2Date
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DOCGEN.dll
|
||||
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DOCGEN.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user