当前位置:网站首页>C#/VB. Net: convert word or EXCEL documents to text
C#/VB. Net: convert word or EXCEL documents to text
2022-07-24 09:19:00 【InfoQ】
install DLL file
Use C# and VB.NET take Word File to Text
using Spire.Doc;
using System.Text;
namespace ConvertWordToText
{
class Program
{
static void Main(string[] args)
{
// Create a Document example
Document document = new Document();
// load Word file
document.LoadFromFile(" Novel coronavirus pneumonia .docx");
// take Word The file is converted to Text file
document.SaveToTxt(" Novel coronavirus pneumonia .txt", Encoding.UTF8);
}
}
}
Imports Spire.Doc
Imports System.Text
Namespace ConvertWordToText
Friend Class Program
Private Shared Sub Main(ByVal args As String())
' Create a Document example
Dim document As Document = New Document()
' load Word file
document.LoadFromFile(" Novel coronavirus pneumonia .docx")
' take Word The file is converted to Text file
document.SaveToTxt(" Novel coronavirus pneumonia .txt", Encoding.UTF8)
End Sub
End Class
End Namespace


Use C# and VB.NET take Excel File to Text
using Spire.Xls;
using System.Text;
namespace ConvertExcelToText
{
class Program
{
static void Main(string[] args)
{
// Create a Workbook example
Workbook workbook = new Workbook();
// load Excel file
workbook.LoadFromFile("GDP ranking .xlsx");
// Get the first sheet
Worksheet worksheet = workbook.Worksheets[0];
// Save sheet as Text file
worksheet.SaveToFile("GDP ranking .txt", " ", Encoding.UTF8);
}
}
}
Imports Spire.Xls
Imports System.Text
Namespace ConvertExcelToText
Friend Class Program
Private Shared Sub Main(ByVal args As String())
' Create a Workbook example
Dim workbook As Workbook = New Workbook()
' load Excel file
workbook.LoadFromFile("GDP ranking .xlsx")
' Get the first sheet
Dim worksheet As Worksheet = workbook.Worksheets(0)
' Save sheet as Text file
worksheet.SaveToFile("GDP ranking .txt", " ", Encoding.UTF8)
End Sub
End Class
End Namespace


边栏推荐
- Scheme and software analysis of dual computer hot standby system "suggestions collection"
- How do tiktok merchants bind the accounts of talents?
- Ue5 film and television animation rendering MRQ layered learning notes
- web安全入门-开源防火墙Pfsense安装配置
- From single architecture to distributed architecture, there are many pits and bugs!
- Assignment operator (geritilent software - Jiuye training)
- Seven data show the impact of tiktok's combination of payment and organic content
- Re6: reading paper licin: a heterogeneous graph based approach for automatic legal stat identification fro
- Tiktok's "online celebrity" was poached by Amazon and broadcast on Amazon live platform
- Aruba learning notes 06 wireless control AC basic configuration (CLI)
猜你喜欢
![[don't bother to strengthen learning] video notes (IV) 2. Dqn realizes maze walking](/img/53/5252c7c6989d142cc2ad6b1c6f513c.png)
[don't bother to strengthen learning] video notes (IV) 2. Dqn realizes maze walking

The next stop of data visualization platform | gifts from domestic open source data visualization datart "super iron powder"

【翻译】使用gRPC和REST的微服务架构中的集成挑战

One click openstack single point mode environment deployment - preliminary construction

Protocol buffers 的问题和滥用

链表——19. 删除链表的倒数第 N 个结点

TCP triple handshake connection combing

PXE principle and configuration

Why is TCP a triple handshake

Configuration of uni app page.json title bar
随机推荐
How can tiktok transport videos not be streaming limited?
Linked list - 19. Delete the penultimate node of the linked list
(5) Cloud integrated gateway gateway +swagger documentation tool
What is tiktok creator fund and how to withdraw it?
【汇编语言实战】(二)、编写一程序计算表达式w=v-(x+y+z-51)的值(含代码、过程截图)
Detailed explanation of the whole process of R & D demand splitting | agile practice
Nuggets manufacturing industry, digital commerce cloud supply chain collaborative management system to achieve full chain intelligent management and control
[the first anniversary of my creation] love needs to be commemorated, so does creation
CUDA day 2: GPU core and Sm core components [easy to understand]
The detailed process of building discuz forum is easy to understand
SQL server2012 installation method details [easy to understand]
Publish your own library on NPM
Replace the function of pow with two-dimensional array (solve the time overrun caused by POW)
Gnuplot software learning notes
Jenkins post build script does not execute
Detailed sequence traversal of leetcode102 binary tree
代码随想录笔记_链表_25K个一组翻转链表
Vim: extend the semantic analysis function of YCM for the third-party library of C language
Scheme and software analysis of dual computer hot standby system "suggestions collection"
Ue5 film and television animation rendering MRQ layered learning notes