将.asp页面上的表导出为ex​​cel

时间:2015-08-15 07:20:11

标签: html asp-classic export-to-excel

我一直在寻找很多外部链接和问题,但无法找到问题的解决方案。

我的.asp页面(经典ASP)上有一个表(用HTML编码和制作)。如何使用该页面上的按钮将其导出到Excel?

1 个答案:

答案 0 :(得分:0)

一个例子......

@Override
public View getChildView ( final int groupPosition, final int childPosition,boolean isLastChild, View convertView, ViewGroup parent ) {

    Datenbankhelper datenbankHelper = null;

    datenbankHelper = datenbankHelper.getDatenBankHelper ( context_global );

    String[] liste_aller_gesten = datenbankHelper.get_liste_aller_gesten( );

    List< String > liste_aller_gesten_datenbank = Arrays.asList( liste_aller_gesten );



    groupPosition_global = groupPosition;
    childPosition_global = childPosition;

    Log.d ( "childPosition_global", "childPosition_global " + childPosition_global + "|" + groupPosition_global );

    // final String childText = ( String ) getChild ( groupPosition, childPosition );
    final String childText = getChild ( groupPosition, childPosition ).toString ();

    if ( convertView == null ) {
        LayoutInflater infalInflater = ( LayoutInflater ) context_global.getSystemService ( Context.LAYOUT_INFLATER_SERVICE );
        convertView = infalInflater.inflate ( R.layout.list_item, null );
    }

    final TextView txtListChild = ( TextView ) convertView.findViewById ( R.id.lblListItem );

    txtListChild.setText( childText );


    Log.d( "childtext123_0", "childtext123_0 " + childText + "|" + txtListChild.getText().toString());

    for(int i=0; i < liste_aller_gesten_datenbank.size(); i++){
        Log.d("childtext123_1", "childtext123_1 " + liste_aller_gesten_datenbank.get( i ));     // Presenting
    }


    if(liste_aller_gesten_datenbank.contains( "Anwendung starten|" + childText )/* && txtListChild.getText().toString().equals( childText )*/){
        Log.d( "in liste_aller_gesten", "in liste_aller_gesten " + groupPosition_global + "|" + childPosition_global );

        convertView.setBackgroundColor( Color.RED );
    }