一、问题描q?/span>
该问题出现是因ؓ在导出文件之?/span>
用户下蝲的是
.csv
文gQ如果用文本~辑器打开可以查看所有记录,但是如果?/span>
excel
打开出C?/span>
sheet
最?/span>
6
万条的记录。因此就不可以用保存ؓ
csv
文g来实?/span>
excel
文g的下载,需要用新的方式去实现?/span>
如果使用
jxl
开发包?/span>
web
后台d?/span>
Excel
文gQ如果数据量比较大,则用户需要等待很长很长的旉才可以下载到Q因?/span>
jxl
的对?/span>
excel
文g的操作都是对象?/span>
,
文g中每一个格子都是一?/span>
cell
对象Q需要后台去
new
。所以还需要考虑别的方式?/span>
二、实现灵?/span>
Excel
文g打开之后选择另存为可以保存ؓ
XML
cd文gQ因此就考虑构造符?/span>
Excel
可以打开?/span>
XML
cd文gQƈ且对?/span>
XML
文gq行最单化处理Q去?/span>
Excel
文g中的每个
cell
?/span>
style
定义?/span>
XML
文g头部的多余信息,最后整理出一个符合资讯^台所下蝲?/span>
Excel
文g的格?/span>
,
L下面Q?/span>
<!—XML
文g头部
--//>
<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<!—Excel
文gW一?/span>
SHEET --//>
<Worksheet ss:Name="sheet0">
<Table>
<Row>
<Cell><Data ss:Type="String">aa0</Data></Cell>
<Cell><Data ss:Type="String">aa1</Data></Cell>
<Cell><Data ss:Type="String">aa2</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">aa0</Data></Cell>
<Cell><Data ss:Type="String">aa1</Data></Cell>
<Cell><Data ss:Type="String">aa2</Data></Cell>
</Row>
</Table>
</Worksheet>
<!—Excel
文gW二?/span>
SHEET --//>
<Worksheet ss:Name="sheet1">
<Table>
<!?
一行数?/span>
--//>
<Row>
<Cell><Data ss:Type="String">aa0</Data></Cell>
<Cell><Data ss:Type="String">aa1</Data></Cell>
<Cell><Data ss:Type="String">aa2</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">aa0</Data></Cell>
<Cell><Data ss:Type="String">aa1</Data></Cell>
<Cell><Data ss:Type="String">aa2</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
<!-- XML
文gl束
--//>
|
注释Q?/span>
a
?/span>
<Worksheet ss:Name="sheet0">
引号内部的是?/span>
sheet
的名U?/span>
b
?/span>
<Data ss:Type="String">aa1</Data> ss:Type
的值是用来定义?/span>
cell
格数据的cdQ例如可以ؓ
Number,
表是?/span>
cell
格数据是数字?/span>
三、实现方?/span>
通过W一步的分析可以发现只要我们构徏q样格式?/span>
XML
数据Q就可以通过
Excel
打开Qƈ且可以实现分
sheet
的样式。但是数据下载到用户本地?/span>
XML
cd的话Q那是没什么意义的Q就打开方式选择使用
Excel
可以打开Q因此如何将用户下蝲的文件类型改?/span>
XLS
呢?q里可以通过在下载的
servlet
中设|?/span>
response.setContentType("application/vnd.ms-excel")
来实现?br />
package com.hoten.util.xmlxls;
import java.util.ArrayList;
private final static String XML_HEARDER = "<?xml version=\"1.0\"?>";
private List sheetList = new ArrayList(); //存放每行多个sheet的list
/**
* 取得workbook的xml文g的头部字W串
* @return
*/
private String getHeader(){
return XML_HEARDER +
"<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"" + Contants.SEP_N +
" xmlns:o=\"urn:schemas-microsoft-com:office:office\"" + Contants.SEP_N +
" xmlns:x=\"urn:schemas-microsoft-com:office:excel\"" + Contants.SEP_N +
" xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"" + Contants.SEP_N +
" xmlns:html=\"http://www.w3.org/TR/REC-html40\">" + Contants.SEP_N ;
}
private String getFoot(){
return "</Workbook>";
}
public String toString(){
StringBuffer strBuff = new StringBuffer();
strBuff.append(getHeader());
int len = sheetList.size();
for(int i=0;i<len;i++){
WorkSheet sheet = (WorkSheet)sheetList.remove(0);
strBuff.append(sheet.toString());
sheet = null;
}
sheetList.clear();
strBuff.append(getFoot());
return strBuff.toString();
}
public void addSheet(WorkSheet sheet){
sheetList.add(sheet);
}
public void removeSheet(int i){
sheetList.remove(i);
}
}
package com.hoten.util.xmlxls;
import java.util.ArrayList;
private String name = ""; //该sheet的name
private List rowList = new ArrayList(); //存放每行多个row的list
public String toString(){
StringBuffer strBuff = new StringBuffer();
strBuff.append("<Worksheet ss:Name=\"" + name + "\">").append(Contants.SEP_N);
strBuff.append("<Table>").append(Contants.SEP_N);
int len = rowList.size();
for(int i=0;i<len;i++){
TableRow row = (TableRow)rowList.remove(0);
strBuff.append(row.toString());
row = null;
}
rowList.clear();
strBuff.append("</Table>").append(Contants.SEP_N);
strBuff.append("</Worksheet>").append(Contants.SEP_N);
return strBuff.toString();
}
public void addRow(TableRow row){
rowList.add(row);
}
public void removeRow(int i){
rowList.remove(i);
}
return name;
}
this.name = name;
}
}
package com.hoten.util.xmlxls;
import java.util.ArrayList;
public String toString(){
StringBuffer strBuff = new StringBuffer();
strBuff.append("<Row>").append(Contants.SEP_N);
int len = cellList.size();
for(int i=0;i<len;i++){
TableCell cell = (TableCell)cellList.remove(0);
strBuff.append(cell.toString()).append(Contants.SEP_N);
cell = null;
}
cellList.clear();
strBuff.append("</Row>").append(Contants.SEP_N);
return strBuff.toString();
}
public void addCell(TableCell cell){
cellList.add(cell);
}
public void removeCell(int i){
cellList.remove(i);
}
}
package com.hoten.util.xmlxls;
private String index = ""; //cell在每行显C的索引位置,可以不填
private CellData data = new CellData(); //cell的数据对?/o:p>
return data;
}
this.data = data;
}
return index;
}
this.index = index;
}
public String toString(){
return "<Cell>" + data.toString() + "</Cell>";
}
}
package com.hoten.util.xmlxls;
private String type = "String"; //cell数据cd
private String value = ""; //cell数据
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String toString(){
return "<Data ss:Type=\"" + type + "\">" + value + "</Data>";
}
}
package com.hoten.util.xmlxls;
public final static String SEP_N = "\n";
/**
* XML中常量定?br /> */
public final static String SS_NAME = "ss:Name";
public final static String SS_INDEX = "ss:Index";
public final static String SS_TYPE = "ss:Type";
试的方?
PrintWriter out = response.getWriter();
// 讄响应头和下蝲保存的文件名
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment; filename=\""+Chinese.toPage(fileNametemp)+"\"");
String rows_temp = request.getParameter("rows");//面传过来的每个SHEET可以存放的条?br /> if (rows_temp == null){
rows_temp = "20000";
}
int count_rows = Integer.parseInt(rows_temp);//一个SHEET有多?br />
WorkBook book = new WorkBook();
Vector v_Rs = RsToVector.ResultSetToVector(rs);// 把RS的D{换成VECTOR,q个可以看我上一版本,上面有详l的写法
if (v_Rs != null) {
int a = v_Rs.size();
int sheet_count = a / count_rows;// 30000行一个sheet?br />
if (sheet_count >0){//大于0Q则需要多个SHEET
for (int i = 0;i<sheet_count;i++){
WorkSheet sheet = new WorkSheet();//创徏一个新的SHEET
sheet.setName("sheet" + i);//讄SHEET的名U?br />
for (int b = i* count_rows ;b<(i+1) * count_rows ;b++){
//temp_v.add(v_Rs.get(b));
Vector temp_v = new Vector();
temp_v =(Vector) v_Rs.get(b);
//取出一个对?把对象的值放到EXCEL?br /> TableRow row = new TableRow();//讄行?br /> for(int m=0;m<numColumns;m++){
TableCell cell = new TableCell();
CellData data = new CellData();
data.setValue((String)temp_v.get(m));
cell.setData(data);
row.addCell(cell);
}
sheet.addRow(row);
}
book.addSheet(sheet);
}
//q有剩余的数?br /> if (sheet_count * count_rows < a){
WorkSheet sheet = new WorkSheet();//创徏一个新的SHEET
sheet.setName("sheet" + sheet_count);//讄SHEET的名U?br />
for (int c = sheet_count* count_rows ;c<a ;c++){
Vector temp_vv = new Vector();
temp_vv =(Vector) v_Rs.get(c);
//取出一个对?把对象的值放到EXCEL?br /> TableRow row = new TableRow();//讄?br /> for(int m=0;m<numColumns;m++){
TableCell cell = new TableCell();
CellData data = new CellData();
data.setValue((String)temp_vv.get(m));
cell.setData(data);
row.addCell(cell);
}
sheet.addRow(row);
}
book.addSheet(sheet);
}
}else{
WorkSheet sheet = new WorkSheet();//创徏一个新的SHEET
sheet.setName("sheet1");//讄SHEET的名U?br />
for (int bb=0 ;bb<a ;bb++){
//temp_v.add(v_Rs.get(b));
Vector temp_v = new Vector();
temp_v =(Vector) v_Rs.get(bb);
//取出一个对?把对象的值放到EXCEL?br /> TableRow row = new TableRow();//讄行?br /> for(int m=0;m<numColumns;m++){
TableCell cell = new TableCell();
CellData data = new CellData();
data.setValue((String)temp_v.get(m));
cell.setData(data);
row.addCell(cell);
}
sheet.addRow(row);
}
book.addSheet(sheet);
}
out.print(book.toString());
}
以上拼XML的时候重复代码比较多,可以写一个公用的Ҏ,,我ؓ了把XML描述的详l一?把这些都装成了对象,但在拼字W串的时?对象׃太多,以后如果改版的话,可以把它量装一点对?q样速度可能会快一?内存可能会少用一?
?: http://www.aygfsteel.com/wujiaqian/archive/2006/12/11/86970.html
以前公司在做下蝲数据的时?主要是用以下q种方式Q?br />
response.setContentType("APPLICATION/OCTET-STREAM");
response.setHeader("Content-Disposition", "attachment; filename=\""+ Chinese.toPage(fileName) + "\"");
但这有个不好的就是它只能打开一个EXCEL的一个工作簿Q如果数据量非常大的话,后面的数据会丢失Q根据这个BUGQ我重新做了一个动态生成EXCEL工作薄的例子Q以方便后面Ҏ应用的改造?br />
首先从数据库里取数据的时候,不知道行Q列Q这样就需要一个动作,把RS转换成一个VECTORQ此对象里每一行也是一个VECTOR
public static Vector ResultSetToVector(ResultSet rs) {
try {
Vector rows = new Vector();
ResultSetMetaData rsmd = rs.getMetaData();
Vector columnHeads = new Vector();
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
columnHeads.addElement(rsmd.getColumnName(i));
}
Vector currentRow;
while(rs.next()){
currentRow = new Vector();
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
currentRow.addElement(Chinese.fromDatabase(rs.getString(i)));
}
rows.addElement(currentRow);
}
return rows;
}
catch (Exception err) {
Log.printError(err, "", "", log);
return null;
}
finally{
try {
if(rs!=null){
rs.close();
rs = null;
}
}
catch (Exception ex) {
}
}
再通过写一个方法,把VECTOR的值放到EXCEL里去?br /> ResultSetMetaData rmeta = rs.getMetaData();
int numColumns = rmeta.getColumnCount();//取多行
String fileNametemp = "c:\\"+fileName;
fileNametemp = fileNametemp.substring(0,fileNametemp.lastIndexOf("."))+CTime.getTime(12)+".xls";
java.io.File file = new java.io.File(fileNametemp);
if (file.exists()) {
file.delete();
}
String rows_temp = request.getParameter("rows");//面传过来的每个SHEET可以存放的条?br /> if (rows_temp == null){
rows_temp = "20000";// 一个表单默?0000行?br /> }
int count_rows = Integer.parseInt(rows_temp);
WritableWorkbook wb = Workbook.createWorkbook(file);
Vector v_Rs = RsToVector.ResultSetToVector(rs);// 把RS的D{换成VECTOR
boolean fg = true;
if (v_Rs != null) {
int a = v_Rs.size();
int sheet_count = a / count_rows;
if (sheet_count >0){//大于0Q则需要多个SHEET
for (int i = 0;i<sheet_count;i++){
Vector temp_v = new Vector();
for (int b = i* count_rows ;b<(i+1) * count_rows ;b++){
temp_v.add(v_Rs.get(b));
}
writeExcel(wb,"sheet"+i,temp_v,numColumns,sheet_count);//EXCEL对象、单元薄名、数据、行数、第几个单元薄 ?br /> }
if (sheet_count * count_rows < a){//不是正好Q还有剩?br /> Vector temp_vv = new Vector();
for (int c = sheet_count* count_rows ;c<a ;c++){
temp_vv.add(v_Rs.get(c));
}
writeExcel(wb,"sheet"+(sheet_count+1),temp_vv,numColumns,sheet_count+1);//EXCEL对象、单元薄名、数据、行数、第几个单元薄?br /> }
}else{
writeExcel(wb,"sheet"+sheet_count,v_Rs,numColumns,0);//EXCEL对象、单元薄名、数据、行数、第几个单元薄?br /> }
fg = true;
}else{
fg = false;
}
wb.write();
wb.close();
String msgs = "";
PrintWriter out = response.getWriter();
if (fg){
msgs = "保存的文件名?+fileNametemp;
msgs = Chinese.toPage(msgs);
}else{
msgs = Chinese.toPage("没有数据导出Q?);
}
int seg = msgs.indexOf(":");
msgs = msgs.substring(0,seg)+":\\"+msgs.substring(seg+1,msgs.length());
out.println("<script>alert('"+msgs+"');window.close();</script>");
写EXCLE的方?br /> /**
* 写Excel文g
* @param filepath String
* @param sheetname String 工作名U?br /> * @param list Vector 内容
* @param colum int 列数
* @return boolean
*/
private boolean writeExcel(WritableWorkbook wb ,String sheetname,
Vector list, int colum,int count) {
String temp = "";
String[] s;
int i = 0;
try {
if (list == null) {
return false;
}
WritableSheet ws = wb.createSheet(sheetname, count);
if (colum == 1) {
while (i != list.size() && list.size() > 0) {
temp = (String) list.get(i);
Label labelC = new Label(i, 0, temp);
ws.addCell(labelC);
i++;
}
} else {
while (i != list.size() && list.size() > 0) {
//s = (String[]) list.get(i);
Vector tm = (Vector) list.get(i);
if (tm == null) {
continue;
} else {
int kk = tm.size();
for (int j = 0; j < kk; j++) {
temp = (String)tm.get(j);
Label labelC = new Label(j, i, temp);
ws.addCell(labelC);
}
}
i++;
}
}
} catch (Exception ex) {
Log.printError(ex, "写excel文g错误", "", "writeexcel.log");
return false;
}
return true;
}
以上Ҏ也有一个问题,是当程序写100000条数据以后,速度会慢下来Q我看了WritableWorkbook 的构造方法的时候,可以生成一个OUTPUTSTREAM对象的,我想可以用这个来做,速度可能会上去,但具体也没有试,如何有哪位哥们试q了Q把性能跟兄弟分享一下!谢谢了!
转自 : http://www.aygfsteel.com/wujiaqian/archive/2006/12/08/86269.html
/**
* 提供了常用的Exceld和写入的Ҏ
* <p> * Title: * </p>
* <p> * Description: * </p>
* <p> * Copyright: Copyright (c) 2006 * </p>
* <p> * Company: * </p>
* * @author wujiaqian * @version 1.0
*/
public class Excel {
int sheetCount = 1; // excel工作,默认?
WritableWorkbook wwb = null; // 构徏Workbook对象,只读Workbook对象
Vector vSheet = null;
/**
* 无参构造函敎ͼ生成默认名字的excel文g
*/
public Excel() {
this("noName.excel");
}
/**
* 带有一个Stringcd参数的构造函?br /> *
* @param fileName
* String 要生成的excel文g?br /> */
public Excel(String fileName) {
try {
wwb = Workbook.createWorkbook(new File(fileName));
vSheet = new Vector(5);
} catch (Exception e) {
}
}
/**
* 带有一个Filecd参数的构造函?br /> *
* @param fileName
* String 要生成的excel文g?br /> */
public Excel(File file) {
try {
wwb = Workbook.createWorkbook(file);
vSheet = new Vector(5);
} catch (Exception e) {
}
}
/**
* d一个EXCEL文g的所有行和列,在同一行上的数据以一个String的Ş式保存在Vector?各列数据?,"号分?br /> *
* @param fileName
* String 文g?br /> * @throws Exception
* @return Vector
*/
public static Vector readFromExcel(String fileName) throws Exception {
Vector v = new Vector();
File file = new File(fileName);
if (!file.isFile()) {
return null;
}
v = readExl(file, -1, -1);
return v;
}
public static Vector readFromExcel(File file) throws Exception {
Vector v = new Vector();
if (!file.isFile()) {
return null;
}
v = readExl(file, -1, -1);
return v;
}
/**
* d一行多列或者一列多?br /> *
* @param fileName
* String 文g?br /> * @param rowORcol
* int W几行或者第几列
* @param flag
* String ROW表示前面一个参数的值指的是行数Q行COL表示前面一个参数的值指的是列数
* @throws Exception
* @return Vector
*/
public static Vector readFromExcel(String fileName, int rowORcol,
String flag) throws Exception {
Vector v = new Vector();
File file = new File(fileName);
if (!file.isFile()) {
return null;
}
if (flag != null && flag.equals("ROW")) {
v = readExl(file, rowORcol, -1);
} else if (flag != null && flag.equals("COL")) {
v = readExl(file, -1, rowORcol);
} else {
return null;
}
return v;
}
public static Vector readFromExcel(File file, int rowORcol, String flag)
throws Exception {
Vector v = new Vector();
if (!file.isFile()) {
return null;
}
if (flag != null && flag.equals("ROW")) {
v = readExl(file, rowORcol, -1);
} else if (flag != null && flag.equals("COL")) {
v = readExl(file, -1, rowORcol);
} else {
return null;
}
return v;
}
/**
* d多行或者多?可以L挑选几行或几列
*
* @param fileName
* String 文g?br /> * @param rowORcol
* int L的行或列
* @param flag
* String ROW表示行COL表示?br /> * @throws Exception
* @return Vector
*/
public static Vector readFromExcel(String fileName, int[] rowORcol,
String flag) throws Exception {
Vector v = new Vector();
return v;
}
public static Vector readFromExcel(File file, int[] rowORcol, String flag)
throws Exception {
Vector v = new Vector();
return v;
}
/**
* dW几行第几列的一个数?br /> *
* @param fileName
* String
* @param row
* int
* @param col
* int
* @throws Exception
* @return String
*/
public static String readFromExcel(String fileName, int row, int col)
throws Exception {
String res = null;
File file = new File(fileName);
if (!file.isFile()) {
return null;
}
return res;
}
public static String readFromExcel(File file, int row, int col)
throws Exception {
String res = null;
if (!file.isFile()) {
return null;
}
return res;
}
/**
* dxls文g
*
* @param f
* File 文g
* @param row
* int d?到row?br /> * @param col
* int d?到col?br /> * @throws Exception
* @return Vector
*/
private static Vector readExl(File f, int row, int col) throws Exception {
Vector v = new Vector();
Workbook wb = null;
Sheet st = null;
wb = Workbook.getWorkbook(f);
st = wb.getSheet(0);
int allRow = st.getRows();
if (row == -1) {
row = allRow;
}
int allCol = st.getColumns();
if (col == -1) {
col = allCol;
}
for (int i = 0; i < row; i++) {
String sRow = null;
for (int j = 0; j < col; j++) {
Cell c1 = st.getCell(j, i);
String sCol = c1.getContents();
if (j == 0) {
sRow = sCol;
} else {
if (sCol != null) {
sRow = sRow + "," + sCol;
} else {
sRow = sRow + "," + "";
}
}
c1 = null;
sCol = null;
}
v.addElement(sRow);
sRow = null;
}
st = null;
wb.close();
wb = null;
return v;
}
public void addSheet() throws Exception {
addSheet(String.valueOf(sheetCount));
}
public void addSheet(String sheetName) throws Exception {
// 创徏Excel工作?br /> WritableSheet ws = wwb.createSheet(sheetName, sheetCount);
vSheet.addElement(ws);
sheetCount++;
}
/**
* 为工作表d内容,指定d到第几列
*
* @param v
* Vector 要添加到工作表的内容 格式
* String,String,String,String,...,...,...,..., 每列内容以逗号隔开
* @param col
* int 指定列数
* @throws Exception
*/
public void addContent(Vector v, int col) throws Exception {
WritableSheet ws = (WritableSheet) vSheet.get(sheetCount - 2);
int size = v.size();
try {
for (int i = 0; i < size; i++) {
String s = (String) v.get(i);
String[] s1 = s.split(",");
for (int j = 0; j < col; j++) {
Label label = new Label(j, i, s1[j]);
ws.addCell(label);
label = null;
}
}
} catch (ArrayIndexOutOfBoundsException e) {
throw new ArrayIndexOutOfBoundsException("check column!");
}
ws = null;
}
/**
* 为工作表d内容,不指定添加几?br /> *
* @param v
* Vector 要添加到工作表的内容 格式
* String,String,String,String,...,...,...,..., 每列内容以逗号隔开
* @throws Exception
*/
public void addContent(Vector v) throws Exception {
WritableSheet ws = (WritableSheet) vSheet.get(sheetCount - 2);
int size = v.size();
try {
for (int i = 0; i < size; i++) {
String s = (String) v.get(i);
String[] s1 = s.split(",");
int col_size = s1.length;
for (int j = 0; j < col_size; j++) {
Label label = new Label(j, i, s1[j]);
ws.addCell(label);
label = null;
}
}
} catch (Exception e) {
throw new Exception();
}
ws = null;
}
/**
* 为工作表d内容,不指定添加几?br /> *
* @param rs
* ResultSet 从数据库中得到的l果?br /> * @throws Exception
*/
public void addContent(ResultSet rs) throws Exception {
if (rs == null) {
return;
}
WritableSheet ws = (WritableSheet) vSheet.get(sheetCount - 2);
ResultSetMetaData rsMetaD = rs.getMetaData();
int col = rsMetaD.getColumnCount();
int i = 0;
while (rs.next()) {
for (int j = 0; j < col; j++) {
Label label = new Label(j, i, rs.getString(j));// Chinese.fromDatabase(rs.getString(j))
ws.addCell(label);
label = null;
}
i++;
}
}
/**
* 最l生成excel文g
*
* @throws Exception
*/
public void createExcel() throws Exception {
wwb.write();
wwb.close();
}
public static void main(String[] args) {
Excel t = new Excel("d:\\test.xls");
Vector v = new Vector();
try {
v.addElement("ding,wen,yuan");
v.addElement("ding,wen,yuan");
t.addSheet("first");
t.addContent(v, 3);
v.clear();
v.addElement("xuhy,hai,yong");
v.addElement("xuhy,hai,yong");
t.addSheet("second");
t.addContent(v, 3);
v.clear();
v.addElement("wu,jia,qian");
v.addElement("wu,jia,qian");
t.addSheet("third");
t.addContent(v, 3);
t.createExcel();
} catch (Exception e) {
e.printStackTrace();
}
}
}
转自:http://www.aygfsteel.com/wujiaqian/archive/2006/12/21/89308.html?Pending=true#Post