excel
当用户按以下方式单击屏幕上的图标时,我正在尝试将从 DB 获取的数据导出到 Excel 工作表。它实际上工作正常,但只是想对此有更好的了解,而不是读取缓冲数据。
private void exportLayout(String date,
PrintWriter prn,
BufferedReader in ) throws Exception
{
String line = null; // Indicates current line
boolean isNotEndofBuffer = true; // boolean to indicate if the end of buffer is reached
boolean skip = false; // boolean to indicate if we can skip reading the current line
try
{
while (isNotEndofBuffer)
{
if (!skip)
{
line = in.readLine();
}
if (line != null)
{
...
ExportUtil.outputLine(prn, TEXT1 +
TEXT2 + TAB +
TEXT3 + TAB );
catch( IOException ioe )
{
ioe.printStackTrace();
throw ioe;
}
catch( Exception ex )
{
ex.printStackTrace();
throw ex;
}