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

excel xlsx file support #15

Closed
cjayswal opened this issue Sep 9, 2016 · 17 comments
Closed

excel xlsx file support #15

cjayswal opened this issue Sep 9, 2016 · 17 comments

Comments

@cjayswal
Copy link
Member

cjayswal commented Sep 9, 2016

No description provided.

@Rupak-66
Copy link

Rupak-66 commented Sep 4, 2019

Hi @cjayswal have you already added support for xlsx in qaf?

@cjayswal
Copy link
Member Author

cjayswal commented Sep 4, 2019

This feature is not in priority for now. Please let us know if it is must have feature.

@Rupak-66
Copy link

Rupak-66 commented Sep 5, 2019

Hi @cjayswal in my case I receive XLSX file directly from business. I need to pick data from XLSX sheet and do the automation. But as XLSX is not supported I need to change the excel format to XLS. It is good to have support for XLSX too. Or else is there anyway to make custom implementation of XLSX for now.

@amitbhoraniya
Copy link
Collaborator

amitbhoraniya commented Sep 10, 2019

Hi Rupak,

Yes there is a way to make custom implementation for data provider.

Here is an example provided in #82

@SaifuddinR
Copy link

How do I upvote this issue ?

@cjayswal
Copy link
Member Author

You can click on emoji and select thumb up as upvote to comment.

@rehmanuet
Copy link

+1 for this feature to support xlsx

@cjayswal cjayswal added the p1 label Apr 19, 2020
@ksitwala-perfecto
Copy link

This is a must have feature because of the xls format limitation of maximum 256 columns allowed. There are cases in which there are more than 256 columns of data needed and for that we need xlsx format.

@SaifuddinR
Copy link

Upvoting on this once again . We are using qmetry with excel file as our data source.
Problem statement : We maintain our data sheets in share point so that Testers/BA's can collaborate and add test data.
Value add for supporting xlsx format for data:

  1. Only xlsx format is allowed on share point for collaboration.
  2. Cannot ask BA's and other project stakeholders to use old(xls) format just because our framework does not support
  3. xlsx is much light weight than the older format --> This becomes very essential when having large size test suites having multiple files as your data source

@reidleingod
Copy link

Upvoting the support for this feature. Just ran into this XLS file's 256-column limitation on my current project - end-to-end test with voluminous test data. Hope this support will be implemented soon.

amitbhoraniya added a commit to amitbhoraniya/qaf that referenced this issue Jan 16, 2021
amitbhoraniya added a commit to amitbhoraniya/qaf that referenced this issue Jan 16, 2021
QAF automation moved this from Backlog to Ready Jan 16, 2021
@rupakgithub
Copy link

Thanks @cjayswal for closing this. Is the fix available on current 3.0.0 version or it will be available on new version?

@cjayswal
Copy link
Member Author

This feature will be available with next release.

@cjayswal cjayswal added this to the 3.0.1 milestone Jan 19, 2021
@reidleingod
Copy link

Thanks @cjayswal for closing this. Is the fix available on current 3.0.0 version or it will be available on new version?

Hi there! While waiting for the next release, you may want to try to manually add the necessary classes and dependencies to your project:

  1. Add QAFInetrceptableDataProvider.java class (is this class name misspelled?) to package com.qmetry.qaf.automation.testng.dataprovider
  2. Add PoiExcelUtil.java class to package com.qmetry.qaf.automation.util
  3. Add the following dependencies:
  • apache poi v4.1.2
  • apache poi-ooxml v4.1.2
  • apache poi commons-collections4 v4.4

Note that I made this to work on my current project and you might encounter the "Label [tableName] for ending data range not found in sheet [sheetName]" error as you update your XLSX file and upon running a test. I simply did insert/delete a column before your data table in your XLSX data file to fix that error.

Hope this helps!

Thanks, @cjayswal and @amitbhoraniya for closing this issue!

@amitbhoraniya
Copy link
Collaborator

Thanks @darkzcythe. As you have started to use this feature, let us know if you find any issue. So we can fix it before next release.

@rupakgithub
Copy link

Thanks @cjayswal for closing this. Is the fix available on current 3.0.0 version or it will be available on new version?

Hi there! While waiting for the next release, you may want to try to manually add the necessary classes and dependencies to your project:

  1. Add QAFInetrceptableDataProvider.java class (is this class name misspelled?) to package com.qmetry.qaf.automation.testng.dataprovider
  2. Add PoiExcelUtil.java class to package com.qmetry.qaf.automation.util
  3. Add the following dependencies:
  • apache poi v4.1.2
  • apache poi-ooxml v4.1.2
  • apache poi commons-collections4 v4.4

Note that I made this to work on my current project and you might encounter the "Label [tableName] for ending data range not found in sheet [sheetName]" error as you update your XLSX file and upon running a test. I simply did insert/delete a column before your data table in your XLSX data file to fix that error.

Hope this helps!

Thanks, @cjayswal and @amitbhoraniya for closing this issue!

Thanks @darkzcythe for explaining. Do you have any git repo for the XLSX example. It would be great.

@reidleingod
Copy link

Thanks @darkzcythe. As you have started to use this feature, let us know if you find any issue. So we can fix it before next release.

Sure thing, @amitbhoraniya !

The only issue I am encountering, so far, as I have mentioned, is when I made change(s) or update(s) to the data in the xlsx test data file or on the data table, like add/remove a column or change a data in a cell or cells, the "Label [tableName] for ending data range not found in sheet [sheetName]" console error occurs when I run the XML test runner.

Currently I have already 400+ columns of test data for a single test scenario (an end-to-end script) and is a separate data file from other tests (I kept the XLS data file for tests with 256 or below test data), so that those other tests will not be affected in case the said XLSX error occured. And when I encounter the said issue when I ran the test with the XLSX data file, I simply do:

  • a) add or remove a blank column to the LEFT of the data table (left of your "key" data table keyword)
  • b) add or remove a blank row ABOVE the data table
  • or do both a) and b)

which is kind of tedious and your test will be prone to error if ever you missed to do the given temporary fix. Hope you can provide a permanent fix for this. Thank you!

@rupakgithub - Sorry but I don't have a public git repo to share this with you. Although, if you have an existing project - qaf framework, you can just follow the steps I have already given to try it out.

@manishbhagat912
Copy link

manishbhagat912 commented Feb 21, 2021

@amitbhoraniya @cjayswal @reidleingod
I tried to run following the above implementation for .xlsx as a driver file. I am able to run my tests. But it fails to run as a data provider that is I am unable to run one scenario n times with n number of possible combinations of rows using the existing key feature of QAF. Please guide on its implementation. With .xls key feature works fine to run tests n times with n rows with a start key and end key added to it

@cjayswal cjayswal moved this from Ready to Released in QAF Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
QAF
  
Released
Development

No branches or pull requests

9 participants