• Sarah J D
  • NEWBIE
  • 30 Points
  • Member since 2018
  • Estuate Software


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
Hi,  

The requirement is When a user search a string, it should go through the content in excel cell by cell.  Finally, if the content matches, should return the cell Number(excel cell number eg. A1,B2..etc.).  Previously I tried for CSV, It worked fine. Excel contains image also.

When I'm trying to parse the input Excel file(xlsx extension), I'm getting this 'core.filemanager.FileBlobValue@238e461' error in backend?

VF Page:

<apex:page sidebar="true" controller="Excel_CLS">
    <apex:message />
    <apex:form >
        <apex:sectionHeader title="Upload data from CSV file"/>
        <apex:pagemessages />
        <apex:pageBlock >
            <center>
                <apex:inputFile id="ids" value="{!contentFile}" filename="{!nameFile}" /> <apex:commandButton action="{!ReadFile}" value="Upload File" id="theButton" style="width:70px;"/>
                <br/> <br/> <font color="red">  </font>
            </center>  
        </apex:pageBlock>       
    </apex:form>   
</apex:page>

Controller:

public class Excel_CLS 
{
    public string nameFile{get;set;}
    public Blob contentFile{get;set;}
    
    public Pagereference ReadFile()
    {
        String nameFile2 = EncodingUtil.urlDecode(st, 'UTF-8');
        Blob b = EncodingUtil.base64Decode(st);
        System.debug('*****'+nameFile);
        System.debug('*****'+contentFile);
        System.debug('*****'+b);
        System.debug('*****'+nameFile2);
        System.debug('*****'+b.toString());
        return null;
    }  
}

Appreciate your help!

Regards
Sarah
This no longer works as described in the Trailhead.  Selecting "User with Limited Access to Treasures" on the CRUD & FLS Visualforce Demo tab yields an "insufficient access" error with no data returned.
Re-factored my code from previous units with base lightning components, but receiving this error.  Here's my new form component.  Any help would be much appreciated.

<aura:component >   
    <aura:attribute name="newItem" type="Camping_Item__c"    default="{ 'sobjectType': 'Camping_Item__c',
                         'Name': '',
                         'Price__c': 0,
                         'Quantity__c': 0,                         
                         'Packed__c': false
                       }"/>
 
    <aura:registerEvent name="addItem" type="c:addItemEvent"/>
    <lightning:layout >
        <lightning:layoutItem padding="around-small" size="6">
<div aria-labelledby="newItemForm">

    <!-- BOXED AREA -->
    <fieldset class="slds-box slds-theme--default slds-container--small">

    <legend id="newItemForm" class="slds-text-heading--small 
      slds-p-vertical--medium">
      Add Camping Item
    </legend>

    <!-- CREATE NEW CAMPING ITEM FORM -->
    <form class="slds-form--stacked">          
        <lightning:input aura:id="itemForm" label="Camping Item Name"
                         name="Name"
                         value="{!v.newItem.Name}"
                         required="true"/> 
        <lightning:input type="number" aura:id="itemForm" label="Quantity"
                         name="Quantity"
                         maxlength="16"
                         min="0"
                         step="1"
                         value="{!v.newItem.Quantity__c}"
                         required="true"/>
        <lightning:input type="number" aura:id="itemForm" label="Price"
                         name="Price"
                         min="0"
                         step=".01"
                         value="{!v.newItem.Price__c}"
                         formatter="currency"
                         messageWhenRangeUnderflow="Enter an amount that's at least .01."/>
        <lightning:input type="checkbox" aura:id="itemForm" label="Packed?"  
                         name="Packed"
                         checked="{!v.newItem.Packed__c}"/>
        <lightning:button label="Create Expense" 
                          class="slds-m-top--medium"
                          variant="brand"
                          onclick="{!c.clickCreateItem}"/>
    </form>
  </fieldset>
  <!-- / BOXED AREA -->

</div>
        </lightning:layoutItem>
    </lightning:layout>
</aura:component>
Hi all, I am working on the Insecure Remote Site Trailhead and can't seem to get the image to display from a static resource zip file.

I am using this as my code
 
<apex:image url="{!URLFOR($Resource.Challenge_Resources,'Challenge_resources/Castle.png')}" />

Are there any steps I should take, hope it helps.
I have a requirement to display the blob content on the VF page, Blob content is received from external web service as Base 64 string and I can convert it in to Blob. Tried the following methods to display the content.

1. converted Base64 in Blob and tried to display but it's displaying something "core.filemanager.FileBlobValue@bd9997c " on the page
2. Directly tried to display Base64 string then obviously it's displaying raw string (very large)
etc.

I want to display that content in original format, it can be of any type (pdf, xls, doc,rtf etc).

I should not use attachement or Document to store the file and download providing link to them.

following is the page used for PDF

<apex:page controller="TestDownloadFileController" sidebar="false" contentType="application/pdf" cache="false" >
{!Content}
</apex:page>

Content will have the blob value of Pdf file.

Please help.

Hi,

 

My requirement is to display the blob content on the page, in fact i am making a callout to external webservice and getting a file content in Base64 string format (now we can covert it to Blob). But not able to display this content in correct format, as i tried with different things like -

 

1. converted Base64 in Blob and tried to display but it's displaying something "core.filemanager.FileBlobValue@bd9997c " on the page

2. Directly tried to display Base64 string then obviously it's displaying raw string (very large)

etc.

 

I want to display that content in original format, it can be of any type (pdf, xls, doc,rtf etc).

 

Any help would be appreciate.