 < ? x m l   v e r s i o n = " 1 . 0 "   e n c o d i n g = " I S O - 8 8 5 9 - 1 "   s t a n d a l o n e = " y e s " ? > 
 < d u n e s - s c r i p t - m o d u l e   n a m e = " r e a d D a t a F o r C o l u m n s "   r e s u l t - t y p e = " A r r a y / P r o p e r t i e s "   a p i - v e r s i o n = " 3 . 1 . 0 "     i d = " b 9 f 4 7 c f 4 - 3 4 c f - 4 3 4 3 - 8 8 f 1 - c b b 6 7 1 5 f e a a 6 "     v e r s i o n = " 0 . 0 . 1 "     a l l o w e d - o p e r a t i o n s = " v f e "   > < d e s c r i p t i o n > < ! [ C D A T A [ T h i s   A c t i o n   r e t u r n s   a n   a r r a y   o f   P r o p e r t i e s   c o n t a i n i n g   a l l   r o w s   o f   t h e   g i v e n   w o r k s h e e t   i n   t h e   g i v e n   E x c e l   f i l e   a s   P r o p e r t i e s   o b j e c t   w i t h   k e y   =   c o l u m n N a m e   a n d   v a l u e   =   c e l l   c o n t e n t ] ] > < / d e s c r i p t i o n > 
 < p a r a m   n = " s o u r c e F i l e "   t = " s t r i n g " > < ! [ C D A T A [ F u l l   p a t h   a n d   f i l e   n a m e   o f   t h e   E x c e l   f i l e   ( m u s t   b e   a c c e s s i b l e   b y   v C O ) ,   e . g .   / t m p / b u i l d s h e e t . x l s ] ] > < / p a r a m > < p a r a m   n = " w o r k s h e e t N a m e "   t = " s t r i n g " > < ! [ C D A T A [ N a m e   o f   t h e   w o r k s h e e t   i n s i d e   t h e   E x c e l   f i l e ] ] > < / p a r a m > < p a r a m   n = " c o l u m n N a m e s T o R e a d "   t = " A r r a y / s t r i n g " > < ! [ C D A T A [ L i s t   c o n t a i n i n g   t h e   c o l u m n   n a m e s   t o   r e a d ] ] > < / p a r a m > < s c r i p t   e n c o d e d = ' f a l s e ' > < ! [ C D A T A [ t r y   { 
 
 	 v a r   j d b c C o n n e c t i o n   =   n e w   J D B C C o n n e c t i o n ( " c o m . g o o g l e c o d e . s q l s h e e t . D r i v e r " ) ; 
 	 
 	 v a r   c o n n e c t i o n U r l   =   " j d b c : x l s : f i l e : "   +   s o u r c e F i l e ; 
 	 / / S y s t e m . d e b u g ( " J D B C   \ " C o n n e c t i n g \ "   t o   ' "   +   c o n n e c t i o n U r l   +   " ' . . . " ) ; 
 	 v a r   c o n n e c t i o n   =   j d b c C o n n e c t i o n . g e t C o n n e c t i o n ( c o n n e c t i o n U r l ) ; 
 	 / / S y s t e m . d e b u g ( " . . . c o n n e c t i o n   s u c c e s s f u l " ) ; 
 	 
 	 v a r   s e l e c t S t a t e m e n t   =   c o n n e c t i o n . c r e a t e S t a t e m e n t ( ) ; 
 	 v a r   s e l e c t S t r i n g   =   " S E L E C T   *   F R O M   \ " "   +   w o r k s h e e t N a m e   +   " \ " " ; 
 	 
 	 v a r   r e s u l t S e t   =   s e l e c t S t a t e m e n t . e x e c u t e Q u e r y ( s e l e c t S t r i n g ) ; 
 	 i f   ( ! r e s u l t S e t )   t h r o w   " N o   r o w s   f o u n d   i n   w o r k s h e e t   ' "   +   w o r k s h e e t N a m e   +   " ' " ; 
 	 
 	 v a r   r e s u l t A r r a y   =   n e w   A r r a y ( ) ; 
 	 / / S y s t e m . d e b u g ( " P r o c e s s i n g   w o r k s h e e t   c o n t e n t " ) ; 
 	 w h i l e   (   r e s u l t S e t . n e x t ( )   )   { 
 	 	 v a r   c u r r e n t R o w P r o p s   =   n e w   P r o p e r t i e s ( ) ; 
 	 	 f o r   e a c h   ( v a r   c u r r e n t C o l u m n N a m e   i n   c o l u m n N a m e s T o R e a d )   { 
 	 	 	 / / r e a d   d a t a ,   " b r u t e - f o r c e "   t r y i n g   e a c h   d a t a t y p e   i f   t h e   p r e c e d i n g   o n e   f a i l s 
 	 	 	 t r y   { 
 	 	 	 	 v a r   c u r r e n t V a l u e   =   r e s u l t S e t . g e t S t r i n g ( c u r r e n t C o l u m n N a m e ) ; 
 	 	 	 }   c a t c h   ( e x )   { 
 	 	 	 	 t r y   { 
 	 	 	 	 	 v a r   c u r r e n t V a l u e   =   r e s u l t S e t . g e t N u m b e r ( c u r r e n t C o l u m n N a m e ) ; 
 	 	 	 	 }   c a t c h   ( e x )   { 
 	 	 	 	 	 t r y   { 
 	 	 	 	 	 	 v a r   c u r r e n t V a l u e   =   r e s u l t S e t . g e t D a t e ( c u r r e n t C o l u m n N a m e ) ; 
 	 	 	 	 	 }   c a t c h   ( e x )   { 
 	 	 	 	 	 	 t r y   { 
 	 	 	 	 	 	 	 v a r   c u r r e n t V a l u e   =   r e s u l t S e t . g e t T i m e s t a m p ( c u r r e n t C o l u m n N a m e ) ; 
 	 	 	 	 	 	 }   c a t c h   ( e x )   { 
 	 	 	 	 	 	 	 t h r o w   " C a n n o t   r e a d   d a t a   f r o m   c o l u m n   ' "   +   c u r r e n t C o l u m n N a m e   +   " ' " ; 
 	 	 	 	 	 	 } 
 	 	 	 	 	 } 
 	 	 	 	 } 
 	 	 	 } 
 	 	 	 c u r r e n t R o w P r o p s . p u t ( c u r r e n t C o l u m n N a m e ,   c u r r e n t V a l u e ) ; 
 	 	 	 / / S y s t e m . d e b u g ( c u r r e n t C o l u m n N a m e   +   " : :   "   +   c u r r e n t V a l u e ) ; 
 	 	 } 
 	 	 r e s u l t A r r a y . p u s h ( c u r r e n t R o w P r o p s ) ; 
 	 } 
 	 
 	 r e t u r n   r e s u l t A r r a y ; 
 
 
 }   c a t c h   ( e x c e p t i o n )   { 
 	 t h r o w   " E r r o r   r e a d i n g   w o r k s h e e t   ' "   +   w o r k s h e e t N a m e   +   " '   i n   f i l e   ' "   +   s o u r c e F i l e   + " ' :   "   +   e x c e p t i o n ; 
 }   f i n a l l y   { 
         t r y   {   i f   ( r e s u l t S e t   ! =   n u l l )   r e s u l t S e t . c l o s e ( ) ;   }   c a t c h   ( e )   { } ; 
         t r y   {   i f   ( s e l e c t S t a t e m e n t   ! =   n u l l )   s e l e c t S t a t e m e n t . c l o s e ( ) ;   }   c a t c h   ( e )   { } ; 
         t r y   {   i f   ( c o n n e c t i o n   ! =   n u l l )   c o n n e c t i o n . c l o s e ( ) ;   }   c a t c h   ( e )   { } ; 
 } ] ] > < / s c r i p t > 
 < / d u n e s - s c r i p t - m o d u l e >