Swapnil Sanghai

Ranch Hand
+ Follow
since Dec 05, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Swapnil Sanghai

I am unable to set the background color for excel(.xlsx) cell using apache poi.
Please suggest which is useful method.

Below is the code used to set the background color -

Hi All,

I tried below method to auto size the column width in xlsx file using apache poi



This is not working for me as the column width is not getting changed.

Please help me on this.


I understood it, but here i want to use POI only.
Can you please tell me how can i resolve it.
I am trying to get answers from different sites but its not working.

Thanks.
6 years ago
Hi i used below code to create file,



File is getting created successfully, but when i open it manually just to see i am getting pop saying "the file format and extension of 'Test.xls' does not match".

Please refer attached image.
6 years ago

Paul Clapham wrote:

Swapnil Sanghai wrote:@ Paul Clapham - Apart from this I wanted to know other way to handle this situation.



Okay, you could also use a setter method in the User class and pass the Target reference in that way. I will leave you to modify my example to do that.



Thanks Paul.
6 years ago
@ Paul Clapham - Apart from this I wanted to know other way to handle this situation.
6 years ago

Campbell Ritchie wrote:Do you mean pass them as method arguments or as constructor arguments?



Yes somewhat like that but not as method arguments or constructor arguments. I should be able to access reference of the object created in multiple classes but initialization will be done once.
6 years ago
Please find below detailed description,
I have created two classes say Class ABC and Class XYZ.

Both the classes are from same package say Package Sample.

I have created object of Class ABC in that class itself and now I want to use/pass recently created object reference of the Class ABC to Class XYZ.

Please let me know all possible ways.

Also please let me know if you need more detailed description on this.
6 years ago
How can I pass object created in one class to the other class.(Both classes are in same package)
6 years ago
I am not able to see content of the javascript in html file when i include javascript file into the HTML file using src attribute in the tag <Script>
7 years ago
Can anyone please let me know if we can read the excel with the help of ADODB.
11 years ago
Can anyone let me know how to read data from excel file without JDBC connection.
11 years ago