Преобразование FODS в CSV с помощью Ruby
Чтение, редактирование и экспорт данных Excel в другие форматы с помощью Cloud SDK с открытым исходным кодом для Ruby.
Преобразование FODS в CSV с помощью Ruby
- Создайте учетную запись наПанель приборов чтобы бесплатно получить информацию о квоте и авторизации по номеру API
- Инициализируйте
CellsApi
, используя идентификатор клиента, секрет клиента, базовый URL-адрес и версию API. - Загрузите файл FODS в облачное хранилище по умолчанию с помощью метода
CellsApi.upload_file
. - Вызовите метод
CellsApi.cells_save_as_post_document_save_as
, чтобы получить результирующий файл CSV.
Начните с Excel API и Ruby SDK
Получите исходный код Cloud SDK для Ruby Excel на сайтеGitHub скомпилировать SDK самостоятельно или перейти кРелизы альтернативные варианты загрузки.
Также взгляните на Swagger на основеAPI Ссылка чтобы узнать больше оExcel ОТДЫХ API.
Код Ruby для преобразования FODS в CSV
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'
class Workbook
include AsposeCellsCloud
def initialize
@instance = AsposeCellsCloud::CellsApi.new($client_id, $client_secret, $api_version, $baseurl)
end
# Convert document and save result to storage
def post_document_save_as
name = $BOOK1
save_options = nil
newfilename = 'output.csv'
is_auto_fit_rows = true
is_auto_fit_columns = true
folder = $TEMPFOLDER
result = @instance.upload_file( folder + "/" + name, ::File.open(File.expand_path("data/" + name), "r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_save_as_post_document_save_as(name, { :save_options=>save_options, :newfilename=>(folder + "/" + newfilename), :is_auto_fit_rows=>is_auto_fit_rows, :is_auto_fit_columns=>is_auto_fit_columns, :folder=>folder})
end
end
workbook = Workbook.new()
puts workbook.post_document_save_as
FAQ
-
How can I get started with Aspose.Cells REST APIs?Quickstart not only guides through the initialization of Aspose.cells Cloud API, it also helps in installing the required libraries.
-
Where can I see the release notes for Aspose.Cells Cloud API?Complete release notes can be reviewed at Aspose.Cells Cloud Documentation.
-
Is it safe to convert FODS to CSV in the Cloud?Of course! Aspose Cloud uses Amazon EC2 cloud servers that guarantee the security and resilience of the service. Please read more about Aspose's Security Practices.
-
What file formats are supported by Aspose.Cells Cloud API?Aspose.Cells Cloud can convert FODS to XML, XLT, XPS, XLTM, DIF, XLSB, TSV, ODS, SVG, PDF, XLSX, MHTML, XLSM, TIFF, MD, CSV and more. Checkout the complete list of supported file formats.
-
I can not find the SDK for my favorite language. What should I do?Aspose.Cells Cloud is also available as a Docker Container. Try using it with cURL in case your required SDK is not available yet.
-
I do not have time to set up. Is there a quick demo for FODS to CSV that I can try?Indeed! Checkout the FODS to CSV Conversion App.
Other Conversion Options
FODS What is FODS File Format?
A file with .fods extension is a type of OpenDocument Spreadsheet document format that stores data in rows and columns. The format is specified as part of ODF 1.2 specifications published and maintained by OASIS. FODS files cannot be opened with Excel, another Spreadsheet software application by Microsoft. FODS files can be saved as ODS using LibreOffice and can be converted to other formats such as XLS and XLSX.
Read MoreCSV What is CSV File Format?
Files with .csv (Comma Separated Values) extension represent plain text files that contain records of data with comma separated values. Each line in a CSV file is a new record from the set of records contained in the file. Such files are generated when data transfer is intended from one storage system to another. Since all applications can recognize records separated by comma, import of such data files to database is done very conveniently. Almost all spreadsheet applications such as Microsoft Excel or OpenOffice Calc can import CSV without much effort. Data imported from such files is arranged in cells of a spreadsheet for representation to user.
Read More