PNG
JPG
BMP
TIFF
TSV
搜尋 TSV C# 中的格式
使用伺服器端 Aspose.Cells for .NET API 進行本機高效能 TSV 文件搜索,無需使用 Microsoft 或 Adobe PDF 等任何軟體。
如何使用 C# 搜尋 TSV 文件
為了搜尋 TSV 文件,我們將使用
API這是一個功能豐富、功能強大且易於使用的文件搜尋API for C#平台。打開
套件管理器,搜尋 Aspose.Cells 並安裝。您也可以從套件管理器控制台使用以下命令。
命令
PM> Install-Package Aspose.Cells
搜尋 C# 中的 TSV 文件的步驟
基本文件搜尋
只需幾行程式碼即可完成 API。
使用 Workbook 類別載入 TSV 檔案。 取得相關工作表中的儲存格。
- 使用查找方法搜尋 Numbers、日期和文本
系統需求
我們的 API 在所有主要平台和作業系統上均受支援。在執行下面的程式碼之前,請確保您的系統符合以下先決條件。
- Microsoft Windows 或具有 .NET Framework、.NET Core、Mono 或 Xamarin 平台的相容作業系統
- 開發環境如Microsoft Visual Studio
- 在專案中新增對 Aspose.Cells for .NET DLL 的引用 - 使用上面的下載按鈕從 NuGet 安裝
搜尋 TSV 文件 - C#
// searching cells containing specified string value or number
Workbook workbook = new Workbook("book1.tsv");
// get cells collection
Cells cells = workbook.Worksheets[0].Cells;
FindOptions opts = new FindOptions();
opts.LookInType = LookInType.Values;
opts.LookAtType = LookAtType.EntireContent;
// find the cell with the input integer or double
Cell cell1 = cells.Find(205, null, opts);
if (cell1 != null){
Console.WriteLine("Name of the cell containing the value: " + cell1.Name);
}else{
Console.WriteLine("Record not found ");
}
// find the cell with the input string
Aspose.Cells.Cell cell2 = cells.Find("Items A", null, opts);
if (cell2 != null){
Console.WriteLine("Name of the cell containing the value: " + cell2.Name);
}else{
Console.WriteLine("Record not found ");
}
// find the cell containing with the input string
opts.LookAtType = LookAtType.Contains;
Cell cell3 = cells.Find("Data", null, opts);
if (cell3 != null){
Console.WriteLine("Name of the cell containing the value: " + cell3.Name);
}else{
Console.WriteLine("Record not found ");
}
關於 Aspose.Cells for .NET API
Aspose.Cells API 可用於建立、編輯、轉換和渲染 Microsoft Excel 格式為不同的格式。此外,它還可用於軟體應用程式中的全面圖表、可擴展報告和可靠計算。 Aspose.Cells 是一個獨立的 API,它不需要任何像 Microsoft 或 OpenOffice 這樣的軟體。線上 TSV 搜尋現場演示
立即造訪我們的 TSV 文件中搜尋文字、單字、片語 現場示範網站 。現場演示有以下好處
無需下載Aspose API。
無需編寫任何程式碼。
只需上傳您的 TSV 文件即可。
搜尋結果立即出現。
TSV 什麼是 TSV 文件格式
製表符分隔值 (TSV) 檔案格式表示以純文字格式的製表符分隔的資料。此文件格式類似於 CSV,用於以結構化方式組織數據,以便在不同應用程式之間匯入和匯出。此格式主要用於電子表格應用程式和資料庫中的資料匯入/匯出和交換。 TSV 檔案中的每筆記錄都包含在單行文字檔案中,其中每個欄位值均由製表符分隔。 TSV 檔案格式的媒體類型是文字/製表符分隔值。
閱讀更多