Advertisement
C_Volume2 Databases/ JDBC #80910

Microsoft Excel Spreadsheet Reader

Creates an object to read Microsoft Excel spreadsheets. This is a really easy way to get data out of a Microsoft Excel Spreadsheet. Methods allow for getting the data from a worksheet as a 2 diminsional String array or a specific column from a worksheet as a 1 diminsional String array. It really isn't that complex of code - there is a sample program included to show you exactly how to use it!! If you find this useful, then please VOTE for me at the bottom of this page!

AI

Résumé par IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Code source
original-source
Upload
// This program outputs a list of exponents of 2 based on limits specified by user
#include <iostream.h>
#include <math.h>
#include <iomanip.h>
int main()
{
	unsigned long int lowExp, highExp; // initializes limits for exponent table
  unsigned long int power, answer; // initializes the variables for power and result
  cout << "This program will ask you for limits, then outputs a list of powers of 2.\n\n";
  // asks for input for low power
  cout << "Enter low exponent from 0 to 20: ";
  cin >> lowExp;
  // loop that repeats as long as lowExp is under minimum 0 or over maximum 20
  while ((lowExp < 0) || (lowExp > 20))
  {
  	cout << "Try again\n";
   cout << endl << "Enter low exponent from 0 to 20: ";
   cin >> lowExp;
  }
  // asks for input of high power
  cout << endl << "Enter high exponent from 0 to 20: ";
  cin >> highExp;
  // loop that repeats as long as highExp is under minimum 0 or maximum 20
  while((highExp < 0) || (highExp > 20) || (highExp < lowExp))
  {
  	cout << "Try again\n";
   cout << endl << "Enter high exponent from 0 to 20: ";
   cin >> highExp;
  }
  cout << endl << " " << setw(2) << "X" << "	 2^X" << endl;
  cout << " " << "==" << "	=======" << endl;
  power = lowExp;
  /* loop that begins output of powers of 2,
  	repeats until reaches specified high limit */
  while(power <= highExp)
 	{
   	answer = pow(2,power);
 		cout << " " << setw(2) << power << "	" << setw(7) << answer << endl;
   	power = power + 1;
 	}
	return 0;
}
Commentaires originaux (3)
Récupéré via Wayback Machine