How to correctly publish an Excel file that has a "."(dot) in its name if we are using the TDV's Swagger API?

How to correctly publish an Excel file that has a "."(dot) in its name if we are using the TDV's Swagger API?

book

Article ID: KB0071551

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions.

Description

When we have added an Excel data source using the Excel non-ODBC adapter and if we want to publish the excel file that has a "." (dot) in its name (e.g., Book.xls) as either a database or a web-service, we can do it using 2 methods:
1. From studio. It gets published without any issues.
2. Using the TDV's Swagger API. Here, we get an error as below -

User-added image
and below steps will help solve this error.

Issue/Introduction

When we want to publish an Excel file that has a dot in its name (e.g., Book.xls), we get an error and the correct way to do this which will avoid the error is mentioned in this article.

Environment

All Supported Environments

Resolution

Let's say the excel file name containing the sheet that we want to publish is "Book.xls" and it contains the sheet named "Sheet1".
So, normally in the Swagger API, we will set the target path address under the "Link Beans" as below -
----------------------------------------------------------------------------------------------
 "targetPath": "/shared/excel_datasource/excel_poc/Book.xls/Sheet1"
----------------------------------------------------------------------------------------------
But this will generate the above-mentioned error.

Now, by just adding an escape character and double inverted commas before and after the excel file name solves the issue and can successfully publish the excel sheet.
Please refer below image as it explains how to get the correct file path and where to add the escape character and double inverted commas.
User-added image
After following the steps, the path should look as below -
--------------------------------------------------------------------------------------------------
 "targetPath": "/shared/excel_datasource/excel_poc/ \"Book.xls\"/Sheet1"
--------------------------------------------------------------------------------------------------