× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Take a look at the code... make a copy and make the parameters bigger.

It shouldn't be hard.
--
Scott Klement

Thanks Scott -- You are right. I got something working to do this (below).

Thanks Buck -- Good advice.

Thanks Mihael - googled libxlsxwriter looks interesting but i'm already
down the road i'm down :-)
http://blog.rpgnextgen.com/blog/2018/03/21/libxlsxwriter-creating-spreadsheets-natively

John

Fit this into my calling program - 'seems' to work for any value except
the absolute max value of int(10) - 2147483647, works for one less -
2147483646.
ie
this -- Row / Col......: 2147483646 100000
returns this -- EQXE2147483647
(i know, 100,000 columns... column "EQXE" . . . never gonna happen :-)

//===============================================================
dcl-proc #cellName ;
dcl-pi *n varchar( 20) ;
peRow int(10) value ;
peCol int(10) value ;
end-pi ;
// ss_cellName(): Convert POI y,x coordinates into a cell name
// (example: 0,0 becomes A1, 110,24 becomes Y111)
// peRow = row number (A=0, B=1, etc)
// peCol = column number
// Returns the alphanumeric cellname
// 'Should' work for both hssf & xssf
//===============================================================
dcl-ds dsAlphabet qualified static ;
whole char( 26) inz('ABCDEFGHIJKLMNOPQRSTUVWXYZ') ;
letter char( 1) dim(26) overlay(whole) ;
end-ds;
dcl-s wwRem int(10) ;
dcl-s wwCN varchar( 20) ;

peRow += 1 ;
peCol += 1 ;
wwCN = '' ;

dou peCol = 0;
wwRem = %rem(peCol: 26);
peCol = %div(peCol: 26);
if (wwRem = 0);
wwRem = 26;
peCol -= 1;
endif;
wwCN = dsAlphabet.letter(wwRem) + wwCN;
enddo;
wwCN = wwCN + %char(peRow);

return wwCN ;
end-proc ;
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.