Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files via upload #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RenatoPasquini
Copy link

I created a new parameter in the read procedure to print the null cells from the XLSX file in the result set of the function. To achieve this, I developed an algorithm to print the cells before displaying a cell extracted from the XLSX file.

The function ‘get_next_cell’ was modified as advised by the package creator. I changed the function to avoid using the unknown array type. Instead, I utilized functions from the package itself to retrieve the next cell (using the ASCII table).

To provide some context, in my current job, I developed a process to convert XLSX files to CSV files (one file per tab).

Changed the function ‘get_next_cell’, I modified the function to not use the unknown arrayType. Instead, I used the functions from the package itself to get the next cell (using the ASCII table)
@antonscheffer
Copy link
Owner

Would a simple pivot query not be easier for creating a CSV?
with csv as ( select row_nr, col_nr, to_char( string_val ) v
from table( as_xlsx.read( as_xlsx.file2blob( 'MY_DIR', 'my.xlsx' ), '1' ) )
)
select *
from csv
pivot ( min(v) v for col_nr in ( 1,2,3,4,5,6,7,8,9,10) )

@RenatoPasquini
Copy link
Author

Yes, it's true if I know how many columns there are in each tab page. For my purpose, I need to convert a lot of XLSX files, using the same piece of code (ODI).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants