function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AshwAshw 

application/vnd.ms-excel#contacts.xls but gridView lines are missing after download

User-added image
<apex:page controller="wrapper3cls" contentType="text/xml">
    <apex:form >
        <apex:pageblock >
            <apex:pageblocktable value="{!lstwrap}" var="awrap">
            <apex:column headerValue="Contacts" >
                    <apex:repeat value="{!awrap.lst}" var="c">
                        <apex:commandLink value="approve" rendered="{!if((awrap.acc.name=='GenePoint'),true,false)}" action="/apex/displaypage?id='+rId"/>
                        <apex:param name="rId" value="{!c.Id}" assignTo="{!rId}"/>
                    </apex:repeat>
            </apex:column>
                <apex:column value="{!awrap.acc.name}"/>
                <apex:column value="{!awrap.acc.phone}"/>
                <apex:column value="{!awrap.acc.fax}"/>
            </apex:pageblocktable>
        </apex:pageblock>
    </apex:form>
</apex:page>
Best Answer chosen by Ashw
Dushyant SonwarDushyant Sonwar
Buddy,
you can use
<head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
   </head>
and set standardstylesheets="false" to get you desired output.

All Answers

Dushyant SonwarDushyant Sonwar
Hey Buddy,
your xls file is not missing gridlines.you are getting correct xls.
What you have to do is:
Click on the “View” tab in the top menu bar in msoffice or any other application that you are using.
Click on the checkbox next to “Gridlines” in the “Show/Hide” panel. Gridlines will now be enabled for every worksheet that you


 
AshwAshw
thanks Dushyant
Actually i did that but every time when the file is downloaded i need to go to view and click checkbox instead of that is there any way to get the grid view initally when the file is downloaded.
Dushyant SonwarDushyant Sonwar
Buddy,
you can use
<head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
   </head>
and set standardstylesheets="false" to get you desired output.
This was selected as the best answer
AshwAshw
Thanks again Dushyant
Where should i place the above mentioned code in my code
AshwAshw
<apex:page controller="wrapper3cls" contentType="application/vnd.ms-excel#contacts.xls" standardStylesheets="false">
    
    <apex:form >
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    </head>
        <apex:pageblock >
            <apex:pageblocktable value="{!lstwrap}" var="awrap">
            <apex:column headerValue="Contacts" >
                    <apex:repeat value="{!awrap.lst}" var="c">
                        <apex:commandLink value="approve" rendered="{!if((awrap.acc.name=='GenePoint'),true,false)}" action="/apex/displaypage?id='+rId"/>
                        <apex:param name="rId" value="{!c.Id}" assignTo="{!rId}"/>
                    </apex:repeat>
            </apex:column>
                <apex:column value="{!awrap.acc.name}"/>
                <apex:column value="{!awrap.acc.phone}"/>
                <apex:column value="{!awrap.acc.fax}"/>
            </apex:pageblocktable>
        </apex:pageblock>
    </apex:form>
</apex:page>

I tryed it but the problem didnt resolve, i placed <head>tag before & after <apex:form> tag
Dushyant SonwarDushyant Sonwar
Actually vf is using encoding. can't remember which one though. you have to use html charset codes.Not sure about this.
Apologies for directing you in a wrong way... :)
jhon aleexjhon aleex
xpand your knowledge and learn to work with spreadsheets , graphics, or advanced , and conditional formatting . & Amp ; nbsp; graduate courses Excel II . Pre-Intermediate will not make trouble to create each table to a maximum of 5 kurz powerpoint (https://www.it-academy.sk/kurz/microsoft-powerpoint-ii-mierne-pokrocily/)