تصدير شهادة VBA إلى ملف أو تيار
Contents
[
Hide
]
Aspose.Cells تسمح لك بتصدير شهادة VBA الرقمية إلى تيار مثل ملف أو تيار الذاكرة. يمكنك الوصول إلى البيانات الخام لشهادة VBA الرقمية باستخدام الخاصية Workbook.VbaProject.CertRawData.
تصدير شهادة VBA إلى ملف أو تيار في C#
يرجى الاطلاع على الرمز العيني التالي الذي يحفظ البيانات الخام لشهادة VBA في ملف. يمكنك تنزيل ملف الإكسل العيني المستخدم في هذا الرمز من الرابط المقدم.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Load your source excel file into workbook object | |
Workbook workbook = new Workbook(dataDir + "sampleVBAProjectSigned.xlsm"); | |
// Retrieve bytes data of Digital Certificate of VBA Project | |
byte[] certBytes = workbook.VbaProject.CertRawData; | |
// Save Certificate Data into FileStream | |
File.WriteAllBytes(dataDir + "Cert_out_", certBytes); |