File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
FAQ/Delete Hyperlinks/.NET/Delete Hyperlinks/Delete Hyperlinks Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 99 </PropertyGroup >
1010
1111 <ItemGroup >
12- <PackageReference Include =" Syncfusion.XlsIO.Net.Core" Version =" 29.1.35 " />
12+ <PackageReference Include =" Syncfusion.XlsIO.Net.Core" Version =" * " />
1313 </ItemGroup >
1414
15+ <ItemGroup >
16+ <None Update =" Output\*" >
17+ <CopyToOutputDirectory >Always</CopyToOutputDirectory >
18+ </None >
19+ </ItemGroup >
1520</Project >
Original file line number Diff line number Diff line change 44using Syncfusion . XlsIO . Implementation ;
55using Syncfusion . XlsIO . Implementation . Collections ;
66
7- namespace Create_Table
7+ namespace Delete_Hyperlinks
88{
99 class Program
1010 {
@@ -17,9 +17,12 @@ static void Main(string[] args)
1717 FileStream inputStream = new FileStream ( "Data/InputTemplate.xlsx" , FileMode . Open , FileAccess . Read ) ;
1818 IWorkbook workbook = application . Workbooks . Open ( inputStream ) ;
1919 IWorksheet worksheet = workbook . Worksheets [ 0 ] ;
20+
2021 // Remove first hyperlink without affecting cell styles
2122 HyperLinksCollection hyperlink = worksheet . HyperLinks as HyperLinksCollection ;
2223 hyperlink . Remove ( hyperlink [ 0 ] as HyperLinkImpl ) ;
24+
25+ //Saving the workbook as stream
2326 FileStream outputStream = new FileStream ( "Output/Output.xlsx" , FileMode . Create , FileAccess . Write ) ;
2427 workbook . SaveAs ( outputStream ) ;
2528 workbook . Close ( ) ;
You can’t perform that action at this time.
0 commit comments